PyXMLSchema

From Jonathan Gardner's Tech Wiki
Jump to: navigation, search

Abstract

Parses XML documents given an XML Schema into a data structure.

Overview

from pyxmlschema import XMLSchemaParser
schema_parser = XMLSchemaParser.from_wsdl_url(wsdl_url)
result = schema_parser.parse_url(doc_url)

Objects

XMLSchemaParser

Element

An Element represents the XML element.

Attributes and children are listed as attributes and accessible as if this were a dict.

The class name is the name of the element describing this XML element.

Value

A value represents a simple value, something like a single bool or int. However, XML Schema allows you to add attributes to a value. These attributes are available as attributes.

The class name of the value is always the name of the element describing the value.