Registry / serialization / serde-xml-rs

serde-xml-rs

JSON →
library0.8.2rscratesunverified

xml-rs based deserializer for Serde (compatible with 1.0).

# Cargo.toml [dependencies] serde-xml-rs = "0.8.2"
INSTALL
IMPORT
SIG · SERDE-XML-RS
S
serde-xml-rs
serializationrustv0.8.2
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.

from_str
use serde_xml_rs::from_str;

Deserialize XML into a Rust struct using Serde.

use serde::Deserialize; use serde_xml_rs::from_str; #[derive(Debug, Deserialize)] struct Person { name: String, age: u32, } fn main() { let xml = "<Person><name>Alice</name><age>30</age></Person>"; let person: Person = from_str(xml).unwrap(); println!("{:?}", person); }
Debug
Known issues
gotchaDoes not support serialization; only deserialization.
fix
Use another crate like quick-xml for serialization.
affects: *
Upgrade
Version history
0.8.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

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