Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace #50

Open
MarcAntoine-Arnaud opened this issue Sep 11, 2017 · 3 comments
Open

Namespace #50

MarcAntoine-Arnaud opened this issue Sep 11, 2017 · 3 comments

Comments

@MarcAntoine-Arnaud
Copy link

Do you have any way to get namespace during deserialisation ?
And to add prefixes (and definition) of them for serialisation ?

@or29544
Copy link

or29544 commented Nov 29, 2020

Yes, I want to make an RSS parser and it also has namespaces. Especially when the RSS feed wants to be smart and implement both atom and rss standards in the same output...Right now serde-xml-rs will just abort deserialization complaining there are two identical fields in the XML. Yes there are, but one of them is namespaced.

@MarcAntoine-Arnaud
Copy link
Author

Old issue !! héhé
I have created a project named Yaserde to handle all specific features of XML.
It can be possible to use Yaserde with Serde, so like that an XML can be wroten in Json etc.

It provides today a pretty good coverage of XML features.

@Cabbache
Copy link

Cabbache commented Nov 26, 2024

If it helps, I've modified the parser so that it includes the namespace name and colon in the attribute name: #216

example:

#[serde(rename = "namespace:attrname")]
namespace_attrname: String,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants