Skip to main content

Crate aster_forge_xml

Crate aster_forge_xml 

Source
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§

AttributeRef
Attributes
ChildElements
Children
DescendantElements
ElementRef
A borrowed view of an element node.
NodeId
Stable identifier for a node in an XmlDocument.
ParseOptions
Tree parsing behavior. Safety limits remain finite by default.
ProcessingInstructionRef
SourceSpan
A byte range in the original XML source.
StreamAttribute
A namespace-resolved attribute borrowed from a streaming start event.
StreamAttributes
Iterator over attributes of a streaming start event.
StreamCData
Decoded CDATA content.
StreamComment
Decoded XML comment content.
StreamEnd
An end element event.
StreamName
A namespace-resolved XML name borrowed from one streaming event.
StreamProcessingInstruction
A processing instruction.
StreamStart
A start or empty element event.
StreamText
Decoded and unescaped character data.
ValidatedXml
A cheap-to-clone, validated XML document retaining the exact original bytes.
XmlDocument
An immutable XML tree whose nodes reference ranges in source whenever possible.
XmlSafetyPolicy
Finite resource and declaration limits applied to untrusted XML.
XmlStreamReader
A streaming XML reader that enforces XmlSafetyPolicy without retaining a full document.
XmlStreamWriter
Direct XML event writer with bounded output and namespace/state validation.
XmlWriteAttribute
One attribute passed to a streaming element write.
XmlWriteOptions
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.
XmlSafetyError
Failures produced while applying an XmlSafetyPolicy.
XmlStreamEvent
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§

BorrowedDocument
A document borrowing its complete source buffer.
OwnedDocument
A document sharing ownership of its source buffer.