Crate ilex_xml

Crate ilex_xml 

Source
Expand description

Tree structure XML reader/writer. Focus on ease of use while maintaining good performance.

let xml = r#"<color hue="100" brightness="50" />"#;

let item = &parse(xml)?[0];

let Item::Element(element) = item else {
    panic!();
};

let attrs = element.get_attributes();

assert_eq!(attrs.get("hue").unwrap(), "100");
assert_eq!(attrs.get("brightness").unwrap(), "50");

Structs§

Element
An XML element: <tag attr="value">...</tag> or <tag attr="value" />.

Enums§

Error
The error type used by this crate.
Item
Any XML item.
Other
Any XML item that is not an element.

Traits§

ToStringSafe
A trait for converting an item to a String without panicing.

Functions§

items_to_string
Stringify a list of XML items.
parse
Parse raw XML.
parse_trimmed
Parse raw XML and trim whitespace at the front and end of text.