Expand description
Helpers for turning quick-xml text events into plain Rust strings.
Since quick-xml 0.41 a character or general entity reference (&,
A) is reported as its own Event::GeneralRef rather than being
folded into the surrounding Event::Text. Any loop that accumulates the
text of an element therefore has to handle both events, or entities are
silently dropped from the result.
Functionsยง
- decode_
escaped - Decode a
BytesTextand resolve any XML entities it still contains. - decode_
plain - Decode an
Event::Textpayload, which quick-xml has already stripped of entity references (those arrive separately asEvent::GeneralRef). - read_
element_ text - Read the full text content of the element that
start_nameopened, resolving entity references. - resolve_
entity - Resolve a single entity reference event to the text it stands for.