You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Alex Shuksto <si...@pisem.net> on 2003/05/14 15:49:55 UTC
DOMParser does not exclude namespace alias from tagnames.
For org.w3c.dom.Document retrieved as follows:
---
DOMParser parser = new DOMParser();
parser.parse("test.xml");
Document document = parser.getDocument();
---
from attached file "test.xml" we'll have that
document.getDocumentElement().getTagName() equals "myns:root", not
"root". Is it a bug or may be i just forgot to set a feature?
Re: DOMParser does not exclude namespace alias from tagnames.
Posted by Alex Shuksto <si...@pisem.net>.
> No, this is not a bug. When you request for the TagName, you get the
> TagName. To get only the localpart of the QName, use, .getLocalName().
>
> -Rahul.
O'key, thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
RE: DOMParser does not exclude namespace alias from tagnames.
Posted by Rahul Srivastava <rs...@firstam.com>.
Hi Alex,
> Alex Shuksto wrote...
<snip/>
>
> from attached file "test.xml" we'll have that
> document.getDocumentElement().getTagName() equals "myns:root", not
> "root". Is it a bug or may be i just forgot to set a feature?
No, this is not a bug. When you request for the TagName, you get the
TagName. To get only the localpart of the QName, use, .getLocalName().
-Rahul.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org