pub enum ReaderEvent {
Show 18 variants
None,
Element,
Attribute,
Text,
CData,
EntityReference,
Entity,
ProcessingInstruction,
Comment,
Document,
DocumentType,
DocumentFragment,
Notation,
Whitespace,
SignificantWhitespace,
EndElement,
EndEntity,
XmlDeclaration,
}Expand description
The reader’s own event vocabulary (xmlReaderTypes), exposed losslessly.
TextReader::node_type maps events 1..=12 onto NodeType and
everything else to None — which conflates end-element with the two
whitespace events (13/14). A streaming caller that reconstructs document
structure needs all three distinguished; TextReader::event returns this
enum instead.
Variants§
None
No node (before the first read / after the last).
Element
An element start tag (<x> or <x/> — see TextReader::is_empty_element).
Attribute
An attribute node (only when navigating attributes explicitly).
Text
A text node with non-whitespace content.
CData
A CDATA section.
EntityReference
An entity reference (unresolved).
Entity
An entity declaration.
ProcessingInstruction
A processing instruction.
Comment
A comment.
Document
The document node.
DocumentType
A DOCTYPE declaration.
DocumentFragment
A document fragment.
Notation
A notation declaration.
Whitespace
Ignorable inter-element whitespace.
SignificantWhitespace
Whitespace in mixed content (significant per the reader).
EndElement
An element end tag (</x>).
EndEntity
The end of an expanded entity.
XmlDeclaration
The <?xml …?> declaration.
Trait Implementations§
Source§impl Clone for ReaderEvent
impl Clone for ReaderEvent
Source§fn clone(&self) -> ReaderEvent
fn clone(&self) -> ReaderEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more