Reader Namespaces at the current level
I would like to suggest two functions be added to the reader
- Add a function to resolve a prefix to a namespace, currently you need a qname (prefix+":"+name)
- Add a function to get an iterator or vec of all the current namespaces, returning (ns_prefix, ns_uri)
Would you mind writing a PR?
I'm curious. Is the mapping of the namespace alias to the canonical URI stored anywhere currently? If so, does that storage method allow reassigning aliases in child levels?
Is the mapping of the namespace alias to the canonical URI stored anywhere currently?
Yes, of course: https://github.com/tafia/quick-xml/blob/add740632a62e0cfdef022e0bdf960009f63f611/src/reader/ns_reader.rs#L27-L28
If so, does that storage method allow reassigning aliases in child levels?
Yes, see the implementation of this struct: https://github.com/tafia/quick-xml/blob/add740632a62e0cfdef022e0bdf960009f63f611/src/name.rs#L390-L400