Enum xml::writer::events::XmlEvent
[−]
[src]
pub enum XmlEvent<'a> { StartDocument { version: XmlVersion, encoding: Option<&'a str>, standalone: Option<bool>, }, ProcessingInstruction { name: &'a str, data: Option<&'a str>, }, StartElement { name: Name<'a>, attributes: Vec<Attribute<'a>>, namespace: &'a Namespace, }, EndElement { name: Name<'a>, }, CData(&'a str), Comment(&'a str), Characters(&'a str), }
An element of an XML output stream.
Items of this enum are consumed by writer::EventWriter
. They correspond to different
elements of an XML document.
Variants
StartDocument | Corresponds to XML document declaration. This event should always be written before any other event. If it is not written at all, default XML declaration will be outputted. Fields
| ||||||
ProcessingInstruction | Denotes an XML processing instruction. This event contains a processing instruction target ( Fields
| ||||||
StartElement | Denotes a beginning of an XML element. This event is emitted after parsing opening tags or after parsing bodiless tags. In the
latter case TODO: ideally names and attributes should be entirely references, including internal strings. Fields
| ||||||
EndElement | Denotes an end of an XML document. This event is emitted after parsing closing tags or after parsing bodiless tags. In the
latter case it is emitted immediately after corresponding Fields
| ||||||
CData | Denotes CDATA content. This event contains unparsed data. No unescaping will be performed. It is possible to configure a parser to emit | ||||||
Comment | Denotes a comment. It is possible to configure a parser to ignore comments, so this event will never be emitted.
See | ||||||
Characters | Denotes character data outside of tags. Contents of this event will always be unescaped, so no entities like It is possible to configure a parser to trim leading and trailing whitespace for this event.
See |