Query Suggestion Options
Last word completion
Keyboard Layouts
GitHub

👀 While it's loading, feel free to check out the other repositories:

🔔 To get a notification when it's ready, leave your email here:

By entering your email, you agree to receive notifications and marketing-related emails

Filter by reset

3447 results 37 ms in tafia/quick-xml

Please document how to pretty-print

I see this has been worked on, and the author suggested someone in the community submit a PR to improve documentation. I'm sure someone would happily do that if they knew how!!! The following is what AI helped me figure out, which I don't know if is "the …

tgrushkatgrushka · 2025-05-17 · 2 · #859

Make BytesCData decode method public

mematthiasmematthias · 2025-04-26 · 2 · #857

:warning: Please install the to ensure uploads and comments are reliably processed by Codecov. Codecov Report All modified and coverable lines are covered by tests :white_check_mark: Project coverage is 60.74%. Comparing base ( a9391f3 ) to head ( 4acc194 …

codecov-commentercodecov-commenter · 2025-04-26

Simplify Deserializer::peek to avoid unreachable

Use Option::insert which allows getting a reference to the value just inserted into the Option. Unfortunately, we can't simplify this to just Option::get_or_insert_with because we can fail to generate the value to insert (if reader.next() fails).

Dr-EmannDr-Emann · 2025-05-11 · 1 · #860

#[serde(rename = "$value")] for Enum Variants

marcfirmarcfir · 2025-03-11 · 4 · #847

questionserde

What you trying to achieve? <A> <a>hjk</a> <b>88</b> </A> could be parsed into #[derive(Serialize, Deserialize, PartialEq, Debug, Clone, Default)] enum Choice { #[serde(rename = "A")] One { a: String, b: i32 }, #[default] Two, } (not tested)

MingunMingun · 2025-02-26

Allow `�` character references

We should either restrict all invalid characters both in literal form and as character references, or none of them. Disallowing only the one character is inconsistently. Because checking literal forms means that we should decode and check all the input, …

MingunMingun · 2024-06-05 · 6 · #750

Deserializing to variant vector fields fails

MoSalMoSal · 2024-08-06 · 4 · #288

2👍2

bugserdearrays

I hit this error as well. I added a test case ( de::tests::enum_::internally_tagged::collection_struct::attributes ) in the vec-invariant branch on my fork. It fails with: ---- de::tests::enum_::internally_tagged::collection_struct::attributes stdout ---- …

cpickcpick · 2021-07-19

Add ability to deserialize serde types from `Reader`

When working with deeply nested xml, most of the time, we are only interested in a portion of the whole tree close to the leaf node. My idea is to extract the string of the target node and deserialize it with serde. But I can't find any convenient way to …

ndtoan96ndtoan96 · 2024-09-01 · 6 · #611

3👍3

enhancementhelp wantedserde

Deserializing $primitive= gives some problems.

stchyshstchysh · 2024-10-08 · 1 · #817

questionserde

What the quick-xml version you use? Support for $unflatten= prefix was removed in 0.27.0. You need to use the overlapped-lists feature in modern quick-xml and #[serde(rename = "$unflatten=...")] renames does not needed, remove them. Attributes should be …

MingunMingun · 2024-10-08

Remove ignored tests which produces warnings since serde 1.0.215

They are never will be implemented anyway. You need to implement deserialization manually if you want two xs:choice fields in your struct.

MingunMingun · 2024-11-22 · 0 · #833

Fix couple of bugs in serde deserializer

MingunMingun · 2022-12-12 · 3 · #523

bugserde

Codecov Report Merging #523 (2b9228d) into master (6347f3b) will increase coverage by 0.07% . The diff coverage is 72.72% . @@ Coverage Diff @@ ## master #523 +/- ## ========================================== + Coverage 61.70% 61.77% +0.07% …

codecov-commentercodecov-commenter · 2022-12-11

Add a `read_text` implementation for async readers

This adds a read_text_into_async method for Readers which allows writing the content in between nested tags to an arbitrary AsyncWriter , analogous to Reader::read_text and NsReader::read_text respectively.

BitSyndicate1BitSyndicate1 · 2025-04-22 · 0 · #856

Resolve "xs:list deserialization does not split on all whitespace"

JGM01JGM01 · 2025-02-02 · 1 · #843

:warning: Please install the to ensure uploads and comments are reliably processed by Codecov. Codecov Report All modified and coverable lines are covered by tests :white_check_mark: Project coverage is 60.56%. Comparing base ( a9391f3 ) to head ( b86f89a …

codecov-commentercodecov-commenter · 2025-02-02

Update maybe_xml dependency 0.3 -> 0.6

maybe_xml is still about 1.5x--2x faster that quick-xml in most tests, except those: rpm_other linescore test_writer_ident players Here is criterion report: comparison.zip

MingunMingun · 2023-10-17 · 1 · #668

XML deserializate failed when text contains `&()_+-=;`

XuanwoXuanwo · 2024-02-28 · 6 · #719

1👀1

questionserde

In the mentioned case should be possible to keep unrecognized entities unexpanded. We have EntityResolver trait and default NoEntityResolver that does nothing. However, I assume, that entity &()_+-=; was formed just by luck. If there would no ; character, …

MingunMingun · 2024-02-27

Question about xml modes

I'm looking through the AttrError and noticed several references to iteration/parsing modes This error can be raised only when the iterator is in XML mode. ...depending on the parsing mode. I'm curious how this can be done. I've tried searching through …

noahbaldnoahbald · 2024-04-20 · 2 · #735

question

Fix Windows test cases

ajtribickajtribick · 2021-08-11 · 3 · #259

Thanks! Indeed writing \r\n is probably a better default on windows,

tafiatafia · 2021-02-08

Fix: the `serialize` feature should also enable `serde/derive`

In master/last release serialize feature implicitly depends on serde/derive . Just add resolve = "2" to Cargo.toml to see the following: error[E0433]: failed to resolve: could not find `Deserialize` in `serde` --> src/name.rs:19:45 | 19 | #[cfg_attr( …

loydloyd · 2022-09-08 · 8 · #472

enhancementserde

Deserialization of a doctype with very long content fails

benoitryderbenoitryder · 2024-09-20 · 7 · #533

2👍2

bughelp wanted

This even happens if there's anything after the <!DOCTYPE> line: comments <?xml-stylesheet> Can we fix this? I would be up to do this since from_str won't work otherwise.

hecatia-eleguahecatia-elegua · 2023-05-19

Lists can be serialized but the result can not be deserialized

quickl xml is not able to deserialize an empty vector. Example below panics at the deserializing of the serialized struct use serde; use quick_xml; #[derive(serde::Serialize, serde::Deserialize)] struct Elements { #[serde(rename = "list")] elems: Vec<()>, …

GunnarMorriganGunnarMorrigan · 2023-11-17 · 4 · #682

serdearrays

Add reserved namespace bindings.

wtwt · 2023-09-06 · 33 · #545

Just so we know, the std versions of the oncecell stuff that I used in this PR is being stabilized as we speak. Part of the work landed in 1.70. The lazy initialized types have not yet landed in stable. However, that may happen in one of the next couple …

wtwt · 2023-06-07

Issue deserializing lists of enums using serde derive

I'm trying to parse xml with the structure <root><string>A</string><string>B</string></root> . I've tried to implement this using serde derive macros as its easier to maintain. The code I've tried is use serde::{Deserialize, Serialize}; #[derive(Serialize …

maddymakesgamesmaddymakesgames · 2024-02-08 · 1 · #712

serdearrays

Add new tests for syntax and ill-formed parser errors and fix... emm... errors

MingunMingun · 2023-11-22 · 1 · #684

bug

Codecov Report Attention: 20 lines in your changes are missing coverage. Please review. Comparison is base ( 64c4249 ) 65.14% compared to head ( 2c55638 ) 65.31%. Files Patch % Lines src/errors.rs 9.09% 10 Missing :warning: src/reader/mod.rs 93.81% 6 …

codecov-commentercodecov-commenter · 2023-11-22

(De)serializing `xsi` attributes (`xsi:type`, `xsi:nil` etc.)

I'm currently working the following XML: <items> <Item xsi:type="Weapon">...</Item> <Item xsi:nil="true" /> <Item xsi:type="Shovel">...</Item> <Item xsi:nil="true" /> <Item xsi:nil="true" /> <Item xsi:nil="true" /> <Item xsi:type="Food">...</Item> </items …

furtidevfurtidev · 2024-10-15 · 2 · #822

de: consider local name only for namespaced tags in structs with `$value`

XiphoseerXiphoseer · 2024-05-13 · 10 · #736

serdenamespaces

Hey, thank you for the review. My case is probably closer to #212, but that was closed as a duplicate of #347. I agree that a regression test would be useful so I'll add one when I find time for it. This change doesn't do anything to fix serialization, …

XiphoseerXiphoseer · 2024-04-12

With serde, is it possible to get unknown variant names outside of a deserializing error?

I'm using serde to deserialize a file format that looks something like this: <root> <list> <type1>content</type1> <type2>a new and exciting content type </type2> <!-- etc --> </list> </root> This is easy to implement and I've done so using an enum because …

DekkonotDekkonot · 2023-06-05 · 3 · #602

questionserde

Use thiserror crate to make error definition more ergonomic.

wtwt · 2023-09-09 · 10 · #640

It should be noted that this is currently a draft as it only changes the main error type and not the other errors. FWIW, I really like how it makes the code more concise. Even more of this may be possible since it can also handle common cases for …

wtwt · 2023-08-27

quick-xml v0.27+ changed behaviour when writing empty values

I'm using quick-xml for my XML-RPC crate (dxr) and I've been a happy user so far, thank you for maintaining the crate! I'm trying to update my quick-xml dependency to a newer version (dxr is currently stuck at v0.25), but I'm hitting a roadblock. It looks …

decathorpedecathorpe · 2023-06-30 · 7 · #617

enhancementhelp wantedserde

schema generator

ThomblinThomblin · 2023-12-15 · 2 · #694

Thanks a lot for your input. I assume that you want to parse multiple XML files to receive a better matching struct as a result: Actually that was on my list of ideas and I was able to implement that with minimal effort (new function extend_struct beside …

ThomblinThomblin · 2023-12-12

Allow `�` values

Do not return error on parsing preperly escaped zero values, which are perfectly valid. Add simple test to check it.

sashkasashka · 2023-07-10 · 17 · #496

enhancement

De/serializing DateTime and Duration

nrempelnrempel · 2022-05-25 · 5 · #339

enhancementhelp wantedserde

Awesome, thank you! We'll look at this again soon.

nrempelnrempel · 2022-05-24

How to use value of e.name without temporary value dropped while borrowed error?

I'm new to Rust, I wanna store the name of the current tag in a variable, so I can create a HashMap using the name as key and its content as value, This is my code: fn parser() { let reader = Reader::from_file("12.xml"); if let Err(e) = reader { panic!("{ …

bangbaewbangbaew · 2023-08-10 · 2 · #628

question

Fix incorrect test for 580 and get rid of allocations in hot path

MingunMingun · 2023-10-09 · 1 · #662

serdeoptimization

Codecov Report Merging #662 (9e8158c) into master (c79ad58) will increase coverage by 0.03% . The diff coverage is 84.78% . :exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@ ## master …

codecov-commentercodecov-commenter · 2023-10-07

Is it as expect that Option attribute serialize into empty string instead of non-attribute.

A simple example here. use serde::Serialize; use quick_xml::se::to_string; #[derive(Serialize)] struct Foo { #[serde(rename = "@foo")] foo: Option<usize> } #[test] fn test_foo() { let foo = Foo { foo: None }; let foo_xml = to_string(&foo).unwrap(); assert …

VonfryVonfry · 2023-12-03 · 1 · #692

serdedocumentation

Problem deserializing a struct that can be serialized

KorribanMasterKorribanMaster · 2024-06-03 · 2 · #752

bughelp wantedserdearrays

To check it out yourself i uploaded a simple example project to reproduce the error https://github.com/KorribanMaster/example_quick_xml

KorribanMasterKorribanMaster · 2024-06-03

Lifetime issue in new unbuffered logic

I have been trying out the new alpha version and I think I stumbled upon a kinda-bug. Somehow something that should be possible is not, I think because of the way lifetimes are indicated in some methods. I'm trying to find a fix, but to reproduce the …

stevenroosestevenroose · 2022-08-15 · 3 · #329

deserialize_struct loses the main element

gkorlandgkorland · 2023-02-20 · 3 · #448

1👍1

serde

slightly off topic: could someone edit the title of this issue to replace loose with the correct word lose. Title should be " deserialize_struct loses the main element"…

spazmspazm · 2023-02-20

Yet another approach to disable trim

I implemented disabling trim by modifying Text struct. See: https://github.com/tafia/quick-xml/issues/285#issuecomment-2863592598 I need this for parsing .odt files. Can anybody give me some feedback? This issue is 4 years old and I'm willing to fix it if …

ggodlewskiggodlewski · 2025-05-30 · 1 · #865

enhancementserde

Yet another approach to disable trim

ggodlewskiggodlewski · 2025-05-30 · 1 · #865

enhancementserde

:warning: Please install the to ensure uploads and comments are reliably processed by Codecov. Codecov Report Attention: Patch coverage is 95.57522% with 5 lines in your changes missing coverage. Please review. Project coverage is 60.67%. Comparing base ( …

codecov-commentercodecov-commenter · 2025-05-29

Start rewrite serde serialization tests

Our serde serializer a far from ideal, but rewriting it requires a very long commit history, as I think (I already have 20 commits and I suspect that I'll double that count...). Because I'm not a big fan of long PRs, I propose that changes, that rewrites …

MingunMingun · 2022-09-04 · 3 · #468

serde

Simplify Deserializer::peek to avoid unreachable

Dr-EmannDr-Emann · 2025-05-11 · 1 · #860

:warning: Please install the to ensure uploads and comments are reliably processed by Codecov. Codecov Report All modified and coverable lines are covered by tests :white_check_mark: Project coverage is 60.74%. Comparing base ( a9391f3 ) to head ( 254fbd2 …

codecov-commentercodecov-commenter · 2025-05-04