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§
Traits§
- ToString
Safe - 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.