-
Notifications
You must be signed in to change notification settings - Fork 38
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
missing ability to get all attributes including namespace #104
Comments
I think the namespace support is lacking in the current wrapper, so this would need a new method, likely |
I needed the same and have implemented it with the signature pub fn get_properties_ns(&self) -> HashMap<(Option<Namespace>, String), String> For my use case, I have implemented Shall I create a pull request? Or do you have a different signature or implementation in mind? |
@anwaralameddin your suggestion sounds reasonable to me. I'm happy to accept such a PR! |
Consider this:
How can I find out that attributes
bar
andns:bar
both exist?The
Node
API offersget_attributes
which returns aHashMap
with all attributes, but this loses namespace information and I only getbar
once.I can access individual attributes by namespace using
get_attribute_ns
, but I have no way to find out which attributes exist in the first place. I would expect something likeget_attributes_ns
which returns a vec ofNode
(of typeAttributeNode
, like what is returned byget_attribute_node
) in order to find this out. Or alternatively aget_attribute_names_ns
which gives a vec of attribute name, attribute namespace tuples.Am I missing something or this is something the API doesn't implement yet?
The text was updated successfully, but these errors were encountered: