Crate xso

Source
Expand description

§XML Streamed Objects – serde-like parsing for XML

This crate provides the traits for parsing XML data into Rust structs, and vice versa.

While it is in 0.0.x versions, many features still need to be developed, but rest assured that there is a solid plan to get it fully usable for even advanced XML scenarios.

XSO is an acronym for XML Stream(ed) Objects, referring to the main field of use of this library in parsing XML streams like specified in RFC 6120.

Re-exports§

pub use text::TextCodec;
pub use asxml::PrintRawXml;

Modules§

asxml
Generic iterator type implementations
error
Error types for XML parsing
fromxml
Generic builder type implementations
minidom_compatminidom
Implementations of traits from this crate for minidom types
text
Convert data to and from XML text

Structs§

Context
Parsing context for FromEventsBuilder

Enums§

Item
Serialisable piece of XML
UnknownAttributePolicy
Control how unknown attributes are handled
UnknownChildPolicy
Control how unknown child elements are handled

Traits§

AsOptionalXmlText
Specialized variant of AsXmlText.
AsXml
Trait allowing to iterate a struct’s contents as serialisable Items.
AsXmlText
Trait to convert a value to an XML text string.
FromEventsBuilder
Trait for a temporary object allowing to construct a struct from rxml::Event items.
FromXml
Trait allowing to construct a struct from a stream of rxml::Event items.
FromXmlText
Trait allowing to convert XML text to a value.

Functions§

from_bytes
Parse a value from a byte slice containing XML data
from_readerstd
Parse a value from a io::BufRead
is_xml_whitespace
Test if a string contains exclusively XML whitespace
to_vec
Serialize a value to UTF-8-encoded XML
transform
Transform a value into another value via XML
try_from_elementDeprecatedminidom
Attempt to convert a minidom::Element into a type implementing FromXml, fallably.

Derive Macros§

AsXmlmacros
Make a struct or enum serialisable to XML
FromXmlmacros
Make a struct or enum parseable from XML