Closed anwaralameddin closed 8 months ago
I think you are making a very reasonable suggestion, and get_property_no_ns
continues the existing pattern.
If you feel like making a PR, I'm happy to accept it.
Thank you! While writing the test, I noticed the same issue for remove_attribute
. That, it removes the first property regardless of namespace. However, it is unclear to me whether the needed bindings exist to address this. Anyway, It could be better handled separately.
Using the current
Node
API, it does not seem always possible to retrieve the value of a property with no namespace when multiple properties have the same local name.The method
get_property
returns the value of the first property with a given local name, regardless of namespace; it cannot retrieve the value of the nonprefixed propertybar
in the node below whenns:bar
andbar
appear in this order:The library already provides two methods,
get_property_ns
andget_property
, that utilisexmlGetNsProp
andxmlGetProp
, respectively. I think I need a third, sayget_property_no_ns
, that similarly utilisesxmlGetNoNsProp
.Please let me know if this can already be achieved differently.