You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Aniruddha Shevade <as...@actuate.com> on 2003/06/28 01:52:04 UTC

Help with Sax Parser

Hello

  I am trying to use A Sax parser .  In the StartElement method  I wish to
find out the Name space for a particular

Node. 

  For e.g if the Node for which the StartElement is triggered is as shown

<test:User xmlns:test ="http://schemas.test.com/">

 

When I iterate through the AttributeList of the StartElement method , I
expect to the the getName method 

to return the Name and Value of the attribute as "xmlns:test"   and
"http://schema.test.com <http://schema.test.com/> "

  Instead what  I get is the getName() method of the AttributeList returns
just "test", thus ignoring the prefix.

 

  Is there a way I can get the entire name

- Regards

 

Aniruddha

 


Re: Help with Sax Parser

Posted by Gareth Reakes <ga...@decisionsoft.com>.
Hi,
	take a look at the docs for XMLAtt. There are 2 methods that do 
what you want depending on the return format you require. They are:

	getAttName 
 	getQName 

Gareth


On Fri, 27 Jun 2003, Aniruddha Shevade wrote:

> Hello
> 
>   I am trying to use A Sax parser .  In the StartElement method  I wish to
> find out the Name space for a particular
> 
> Node. 
> 
>   For e.g if the Node for which the StartElement is triggered is as shown
> 
> <test:User xmlns:test ="http://schemas.test.com/">
> 
>  
> 
> When I iterate through the AttributeList of the StartElement method , I
> expect to the the getName method 
> 
> to return the Name and Value of the attribute as "xmlns:test"   and
> "http://schema.test.com <http://schema.test.com/> "
> 
>   Instead what  I get is the getName() method of the AttributeList returns
> just "test", thus ignoring the prefix.
> 
>  
> 
>   Is there a way I can get the entire name
> 
> - Regards
> 
>  
> 
> Aniruddha
> 
>  
> 
> 

-- 
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




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