Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How do I retrieve attributes in correct order from a DOM

Reply
Thread Tools

How do I retrieve attributes in correct order from a DOM

 
 
Prashant Parashar
Guest
Posts: n/a
 
      04-13-2006
Hi,
How do I retrieve attributes in correct order from a DOM?

the NamedNodeMap does not maintain the order and the
Node.getChildNodes() is not returning the attributes. Is there a way to
get attributes in correct order.

Thanks,
Prashant Parashar

 
Reply With Quote
 
 
 
 
Prashant Parashar
Guest
Posts: n/a
 
      04-13-2006
is this related to Xerces or particular implementation?

 
Reply With Quote
 
 
 
 
Oliver Wong
Guest
Posts: n/a
 
      04-13-2006

"Prashant Parashar" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi,
> How do I retrieve attributes in correct order from a DOM?
>
> the NamedNodeMap does not maintain the order and the
> Node.getChildNodes() is not returning the attributes. Is there a way to
> get attributes in correct order.
>
> Thanks,
> Prashant Parashar


According to the XML standard, the order of attributes in an XML DOM is
not significant. If order is significant, then the document should use
children elements rather than attributes.

- Oliver

 
Reply With Quote
 
Oliver Wong
Guest
Posts: n/a
 
      04-13-2006
"Prashant Parashar" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> is this related to Xerces or particular implementation?
>


In a sense. The XML specification states that order of attributes are
not siginificant, so implementations are free to return the attributes in
any order they wish. You might want to seek out an implementation which
guarantees a certain ordering.

- Oliver

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why can't I retrieve style properties from DOM? lcplben Javascript 6 10-03-2009 09:02 AM
How do I retrieve attributes in correct order from a DOM Prashant Parashar Java 1 04-13-2006 06:18 PM
retrieve and manipulate the description attributes (meta info?) from an image file intec studenf ASP .Net 0 05-04-2005 12:10 PM
Cannot retrieve a correct instance from a ListBox in a User Contro Pierre ASP .Net Building Controls 0 03-02-2005 10:57 PM
Retrieve a Panel's style attributes John Spiegel ASP .Net 3 02-06-2004 09:05 PM



Advertisments