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 kb...@informatica.com on 2000/10/13 02:38:48 UTC

Attribute ordering

XML does not have any attribute ordering. But for the purposes of output, I
would prefer it to be 
in some way.
Does the DOM_Node which is an element have attributes as children.
Can I do DOM_Node parentNode;
	...
	   DOM_Node childAttr = parentNode.getFirstChild();
	   while (childAttr != 0)
	   {
 		if (childAttr.getNodeType() == DOM_Node::ATTRIBUTE_NODE)
		{
			//Do something
		}
		childAttr = childAttr.getNextSibling();
	   }

This does not give me the list of attributes. Is there any other way other
than the DOM_NamedMap
to access the attributes in a DOM tree.

Kiran

Re: Attribute ordering

Posted by Dennis Gearon <ge...@OIT.EDU>.
I don't think attributes inherit off off DOM_Node, do they?



kbagepalli@informatica.com wrote:
> 
> XML does not have any attribute ordering. But for the purposes of output, I
> would prefer it to be
> in some way.
> Does the DOM_Node which is an element have attributes as children.
> Can I do DOM_Node parentNode;
>         ...
>            DOM_Node childAttr = parentNode.getFirstChild();
>            while (childAttr != 0)
>            {
>                 if (childAttr.getNodeType() == DOM_Node::ATTRIBUTE_NODE)
>                 {
>                         //Do something
>                 }
>                 childAttr = childAttr.getNextSibling();
>            }
> 
> This does not give me the list of attributes. Is there any other way other
> than the DOM_NamedMap
> to access the attributes in a DOM tree.
> 
> Kiran
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
-- 
________________________________________________________________
Dennis K. Gearon (Kegley)                           Loyal Member
Scientific Instrument Technician, School of ETM       of The 
Oregon Institute of Technology                       Order of
- One of USA's Best College Buys                       TUX
3201 Campus Drive                             ~
Klamath Falls, OR 97601                      'v'    standards
Voice   1-541-885-1563                      // \\   corrupters:
FAX     1-541-885-1689                     /(   )\   ^phear^
email   gearond@oit.edu                     ^`~'^   the penguin 
________________________________________________________________
Happiness is when you want to go to your job in the morning and 
when you want to go home in the evening.
________________________________________________________________