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 "Gupta, Vikas" <Vi...@commerceone.com> on 2002/10/17 01:24:07 UTC

getLocalName() method on Node

Hi
There is a method getLocalName() on the DOM Node object. It is supposed to
return the local part of the fully qualified node name i.e. the part of the
name to the right of the : in a namespace qualified name. 
Somehow it keeps returning a null to me. I am using xerces via jaxp. Is
there some setting on the jaxp that I need to do before parsing my document?
Any help will be appreciated.

Thx


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: getLocalName() method on Node

Posted by Simon Kitching <si...@ecnetwork.co.nz>.
Hi Gupta,

The getLocalName() method of course works only on Nodes which happen to
be Elements (or attributes).Other Node types don't have names.

Are you quite certain that the Node object you are calling getLocalName
on is really an Element (maybe try getNodeType() to verify this)?

Regards,

Simon

On Thu, 2002-10-17 at 12:24, Gupta, Vikas wrote:
> Hi
> There is a method getLocalName() on the DOM Node object. It is supposed to
> return the local part of the fully qualified node name i.e. the part of the
> name to the right of the : in a namespace qualified name. 
> Somehow it keeps returning a null to me. I am using xerces via jaxp. Is
> there some setting on the jaxp that I need to do before parsing my document?
> Any help will be appreciated.
> 
> Thx
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org