pub fn parse(xml: &str) -> Option<Node>Expand description
Read a document and return its root element.
This follows the oracle, which loads the document with the default parse
flags and never changes them (src/stream_info_impl.cpp:183):
- Text that holds only whitespace is dropped.
captures/desc/desc_reader.txt, casewhitespace_only_text. - A comment is dropped. Same file, case
comment. - A line end is normalized.
\r\nand a lone\rboth become\n.captures/desc/desc_reparse.hexshows a carriage return that does not survive the round trip. - An entity reference is decoded, and a reference with no semicolon stays
as it is. Same file, case
unterminated_reference.