Enum xmlparser::Token [] [src]

pub enum Token<'a> {
    Declaration(StrSpan<'a>, Option<StrSpan<'a>>, Option<StrSpan<'a>>),
    ProcessingInstruction(StrSpan<'a>, Option<StrSpan<'a>>),
    Comment(StrSpan<'a>),
    DtdStart(StrSpan<'a>, Option<ExternalId<'a>>),
    EmptyDtd(StrSpan<'a>, Option<ExternalId<'a>>),
    EntityDeclaration(StrSpan<'a>, EntityDefinition<'a>),
    DtdEnd,
    ElementStart(StrSpan<'a>, StrSpan<'a>),
    Attribute((StrSpan<'a>, StrSpan<'a>)StrSpan<'a>),
    ElementEnd(ElementEnd<'a>),
    Text(StrSpan<'a>),
    Whitespaces(StrSpan<'a>),
    Cdata(StrSpan<'a>),
}

An XML token.

Variants

Declaration token.

Example: <?xml version="1.0"?>

Processing instruction token.

Example: <?target content?>

The comment token.

Example: <!-- text -->

DOCTYPE start token.

Example: <!DOCTYPE note [

Empty DOCTYPE token.

Example: <!DOCTYPE note>

ENTITY token.

Can appear only inside the DTD.

Example: <!ENTITY ns_extend "http://test.com">

DOCTYPE end token.

Example: ]>

Element start token.

Contains prefix and local part of the qualified name.

Example: <elem

Attribute.

Contains prefix and local part of the qualified name and value.

Example: name="value"

Element end token.

Text token.

Contains text between elements including whitespaces. Basically everything between > and <.

Contains text as is. Use TextUnescape to unescape it.

Example: <text>text</text>

Whitespaces token.

The same as Text token, but contains only spaces.

Spaces can be encoded like &#x20.

CDATA token.

Example: <![CDATA[text]]>

Trait Implementations

impl<'a> Debug for Token<'a>
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> Send for Token<'a>

impl<'a> Sync for Token<'a>