Skip to main content

Module parser

Module parser 

Source
Expand description

XSD parser built on quick_xml streaming events.

The parser drives a simple recursive-descent state machine over the flat event stream produced by quick_xml::Reader. No DOM tree is built; each recognised element is accumulated directly into the Schema being constructed.

§Supported constructs

XSD constructRust mapping
<xs:element name="…" type="…"/> (top-level)Element
<xs:simpleType> + <xs:restriction>SimpleType / Restriction
Facets: enumeration, pattern, minLength, maxLength, minInclusive, maxInclusive, totalDigits, fractionDigitsFacet variants
<xs:complexType> + <xs:sequence>ComplexContent::Sequence
<xs:complexType> + <xs:choice>ComplexContent::Choice
<xs:complexType> + <xs:simpleContent><xs:extension>ComplexContent::SimpleContent
<xs:complexType> + <xs:any>ComplexContent::Any

Enums§

ParseError
Errors that can occur while parsing an XSD file.

Functions§

parse
Parse an XSD schema from any BufRead source.
parse_str
Parse an XSD schema from a string slice.