Skip to main content

parse_xml_tree

Function parse_xml_tree 

Source
pub fn parse_xml_tree(xml: &str) -> Result<DdsXmlDocument, XmlError>
Expand description

Parses a DDS-XML 1.0 document per §7.1.

Well-formedness guarantees:

  • XML declaration optional (Spec §7.1.1).
  • Whitespace-tolerant (roxmltree normalizes text).
  • Comments are stripped (<!-- ... --> are not delivered by roxmltree as element nodes).
  • Namespace-aware: the top-level namespace is carried in the root (Spec §7.3.x: targetNamespace = http://www.omg.org/spec/DDS-XML).

DoS caps per Cluster F: at most MAX_LIST_ELEMENTS children per node, at most MAX_TOTAL_ELEMENTS nodes total.

§Errors