Registry / serialization / quick-xml

quick-xml

JSON →
library0.40.1rscratesunverified

High performance xml reader and writer

# Cargo.toml [dependencies] quick-xml = "0.40.1"
INSTALL
IMPORT
SIG · QUICK-XML
Q
quick-xml
serializationrustv0.40.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Reader
✓ use quick_xml::Reader;

Parse XML using a streaming reader with event-based API.

use quick_xml::Reader; use quick_xml::events::Event; fn main() { let xml = b"<root><item>Hello</item></root>"; let mut reader = Reader::from_reader(xml.as_ref()); let mut buf = Vec::new(); loop { match reader.read_event_into(&mut buf) { Ok(Event::Start(ref e)) => println!("start: {:?}", e.name()), Ok(Event::Text(ref e)) => println!("text: {}", e.unescape().unwrap()), Ok(Event::Eof) => break, Err(e) => panic!("Error: {:?}", e), _ => (), } buf.clear(); } }
Debug
Known issues
gotchaDefault reader does not support namespaces; enable `ns` feature for namespace support.
fix
Add `features = ["ns"]` to your Cargo.toml dependency.
affects: >=0.20.0
Upgrade
Version history
0.40.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
quick-xml — cargo add quick-xml · libregistry