Expand description
Bounded, source-backed XML parsing for Aster services.
Parsed documents use a flat arena and retain source spans for names, attributes, text, and subtrees. Values allocate only when XML decoding or configured normalization changes them.
Structs§
- Attribute
Ref - Attributes
- Child
Elements - Children
- Descendant
Elements - Element
Ref - A borrowed view of an element node.
- NodeId
- Stable identifier for a node in an
XmlDocument. - Parse
Options - Tree parsing behavior. Safety limits remain finite by default.
- Processing
Instruction Ref - Source
Span - A byte range in the original XML source.
- Stream
Attribute - A namespace-resolved attribute borrowed from a streaming start event.
- Stream
Attributes - Iterator over attributes of a streaming start event.
- StreamC
Data - Decoded CDATA content.
- Stream
Comment - Decoded XML comment content.
- Stream
End - An end element event.
- Stream
Name - A namespace-resolved XML name borrowed from one streaming event.
- Stream
Processing Instruction - A processing instruction.
- Stream
Start - A start or empty element event.
- Stream
Text - Decoded and unescaped character data.
- Validated
Xml - A cheap-to-clone, validated XML document retaining the exact original bytes.
- XmlDocument
- An immutable XML tree whose nodes reference ranges in
sourcewhenever possible. - XmlSafety
Policy - Finite resource and declaration limits applied to untrusted XML.
- XmlStream
Reader - A streaming XML reader that enforces
XmlSafetyPolicywithout retaining a full document. - XmlStream
Writer - Direct XML event writer with bounded output and namespace/state validation.
- XmlWrite
Attribute - One attribute passed to a streaming element write.
- XmlWrite
Options - Finite output limits and document options for
XmlStreamWriter.
Enums§
- Error
- Errors produced while parsing or retaining an XML document.
- NodeRef
- A borrowed XML node view.
- XmlSafety
Error - Failures produced while applying an
XmlSafetyPolicy. - XmlStream
Event - One bounded streaming XML event.
Constants§
- DEFAULT_
XML_ MAX_ DEPTH - The default maximum nesting depth accepted from untrusted XML.
Functions§
- validate_
xml_ input - Validates one complete XML document without constructing a DOM.
- xml_
root_ local_ name - Returns the local name of a validated document root.
Type Aliases§
- Borrowed
Document - A document borrowing its complete source buffer.
- Owned
Document - A document sharing ownership of its source buffer.