Skip to content

Commit

Permalink
Merge pull request tafia#535 from emarsden/master
Browse files Browse the repository at this point in the history
Fix documentation example for specification of @Attribute names
  • Loading branch information
Mingun authored Jan 1, 2023
2 parents 89fa620 + a297a44 commit 4a09041
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ assert_eq!(result, expected.as_bytes());
## Serde

When using the `serialize` feature, quick-xml can be used with serde's `Serialize`/`Deserialize` traits.
The mapping between XML and Rust types, and in particular the syntax that allows you to specify the
distinction between *elements* and *attributes*, is described in detail in the documentation
for [deserialization](https://docs.rs/quick-xml/latest/quick_xml/de/).

### Credits

Expand All @@ -124,6 +127,7 @@ you can use either the special name `$text`, or the special name `$value`:

```rust,ignore
struct Foo {
#[serde(rename = "@abc")]
pub abc: String,
#[serde(rename = "$text")]
pub body: String,
Expand Down

0 comments on commit 4a09041

Please sign in to comment.