MCPcopy Index your code
hub / github.com/RReverser/serde-xml-rs

github.com/RReverser/serde-xml-rs @0.8.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.8.2 ↗ · + Follow
439 symbols 749 edges 44 files 12 documented · 3% updated 5mo ago0.8.1 · 2025-06-01★ 33233 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

serde-xml-rs

Rust

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

Example usage

use serde::{Deserialize, Serialize};
use serde_xml_rs::{from_str, to_string};

#[derive(Debug, Serialize, Deserialize, PartialEq)]
struct Item {
    name: String,
    source: String,
}

fn main() {
    let src = r#"<?xml version="1.0" encoding="UTF-8"?><Item><name>Banana</name>

Store

</Item>"#;
    let should_be = Item {
        name: "Banana".to_string(),
        source: "Store".to_string(),
    };

    let item: Item = from_str(src).unwrap();
    assert_eq!(item, should_be);

    let reserialized_item = to_string(&item).unwrap();
    assert_eq!(src, reserialized_item);
}

Breaking changes in version 0.8.0

Notably: - The $value name has been changed to #content (could become configurable in the future). - Fields that are deserialized from attributes must now have a name that starts with a @. This aligns with what was introduced in the serializer.

See MIGRATION.md for more details, and tips on how to migrate.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 231
Class 95
Function 93
Enum 19
Interface 1

Languages

Rust100%

Modules by API surface

src/ser/mod.rs35 symbols
src/ser/plain.rs34 symbols
src/ser/child.rs33 symbols
src/de/plain.rs27 symbols
src/de/mod.rs24 symbols
src/de/child.rs24 symbols
src/de/reader.rs23 symbols
src/config.rs17 symbols
tests/maven_pom.rs14 symbols
tests/xml_rpc.rs12 symbols
src/test/choice_sequence.rs12 symbols
src/test/attributes.rs11 symbols

For agents

$ claude mcp add serde-xml-rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page