Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

serde-xml-rs

> 编程语言
Open source

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

331 stars0 likes1 views
WebsiteGitHub

About

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

serde-xml-rs

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

Example usage

rust
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#"BananaStore"#;
    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.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustdeserializationparsingrustserde

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言