3 Jun
2006
3 Jun
'06
12:41 p.m.
Hi Andreas, Andreas Pakulat wrote:
I'd like to be able to extract the namespace and namespace prefix for an element and it seems I can't do that with the current API (unless I'm overlooking something). Is there a way to make this work?
Of course I can just "parse" the tag name for the namespace, but this doesn't give me the namespace prefix used.
The prefix is returned by the "prefix" property on an Element. However, there is currently no direct way to parse a tag name, although IMHO there should be. Maybe we should extend the QName class with "namespace" and "local_name" attributes to provide a way for parsing "{ns}tag" names. Stefan