eminence / xmltree-rs

Reads an XML file into a simple tree structure
MIT License
39 stars 31 forks source link

Namespaced attributes not parsed #5

Closed rminderhoud closed 7 years ago

rminderhoud commented 8 years ago

Currently the parser does not parse namespaced attributes. E.g. <technique profile="Max" xmlns:max="some/max/schema"></technique> results in the following hashmap {"profile":"Max"} with the xmlns:max attribute missing.

Looks like it may be a limitation of xml-rs attribute parser?

eminence commented 8 years ago

No, I think this is because xmltree-rs purposefully ignores namespace stuff. So I think this can be fixed in-crate. I'll take a look

rminderhoud commented 8 years ago

Namespaces are also ignored on elements names, e.g. <max:myElement>foo</max> returns a name of myElement in xmltree. I'll take a look as well as I'm happy to contribute. Could be that namespace should be added to the Element struct and the parser updated but I haven't looked closely yet. Loving this library so far.

eminence commented 8 years ago

If you want to work on a patch for this, that would be great!

eminence commented 7 years ago

The latest version (0.4.0) should now have namespace support. Please try it out and let me know if you have any issues!