You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Lev Lvovsky <li...@sonous.com> on 2008/05/07 22:37:52 UTC
getLocalName vs getNodeName
Is it correct to assume that the getLocalName method will return null
on a DOMElement object unless a Schema has been specified? For a very
simple XML test file, getNodeName returns what it should, however
getLocalName returns null. Testing with an XML file for which the
Schema is supplied, getLocalName works fine.
Otherwise, is there any other reason why this might be happening?
thanks!
-lev
Re: getLocalName vs getNodeName
Posted by Alberto Massari <am...@datadirect.com>.
getLocalName returns NULL if the DOM element has been created when
namespace processing was off (in order to use a schema namespace
processing must be on, so in this case it returns non-NULL pointers). So
you could be not using a schema but having local names in DOM elements.
Alberto
Lev Lvovsky wrote:
> Is it correct to assume that the getLocalName method will return null
> on a DOMElement object unless a Schema has been specified? For a very
> simple XML test file, getNodeName returns what it should, however
> getLocalName returns null. Testing with an XML file for which the
> Schema is supplied, getLocalName works fine.
>
> Otherwise, is there any other reason why this might be happening?
>
> thanks!
> -lev
>
>