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 mini thomas <mi...@yahoo.com> on 2009/07/31 16:57:20 UTC

Attribute order in XercesDOMParser

Hi,
 
I need to parse contents of a file, add an extra attribute to the root node and then update the file with the modified XML. I found that the order of attributes are getting changed, after parsing and serializing the parser contents.
 
Is there are option to turn off attribute sorting done by  XercesDOMParser?
 
Thanks,
Mini


      

RE: Attribute order in XercesDOMParser

Posted by Jesse Pelton <js...@PKC.com>.
I doubt it.  Attribute order in XML is insignificant.  You might be able to write your own serializer or modify the Xerces one you're using, but I'm not sure that you'll be able to reliably determine the original attribute order.

If order is important, you might be better off treating the XML as text and just inserting the characters. 

-----Original Message-----
From: mini thomas [mailto:mini_mol_thomas@yahoo.com] 
Sent: Friday, July 31, 2009 10:57 AM
To: c-users@xerces.apache.org
Subject: Attribute order in XercesDOMParser

Hi,
 
I need to parse contents of a file, add an extra attribute to the root node and then update the file with the modified XML. I found that the order of attributes are getting changed, after parsing and serializing the parser contents.
 
Is there are option to turn off attribute sorting done by  XercesDOMParser?
 
Thanks,
Mini