aspose file tools
The moose likes XML and Related Technologies and the fly likes org.w3c.dom.* saves my XML with attributes in alphabetical order Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "org.w3c.dom.* saves my XML with attributes in alphabetical order" Watch "org.w3c.dom.* saves my XML with attributes in alphabetical order" New topic
Author

org.w3c.dom.* saves my XML with attributes in alphabetical order

Guy Harel
Greenhorn

Joined: Oct 21, 2009
Posts: 8
I have read many posts saying that there was no solution to the problem of attribute alphabetical name ordering during a document save. I am wondering if there is now a solution ? The new XML crashes a .NET application...


Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

Then that .NET application is badly written. The XML specification allows attributes to appear in any order. Any XML parser / reader should be able to handle this.

Anyway, moving to our XML forum.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
Guy Harel
Greenhorn

Joined: Oct 21, 2009
Posts: 8
I will try to use JDom instead, perhaps it won't change the attribute order.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

Good luck with that. I can't believe that .NET comes with broken XML parsers, I'm sure it must be the C# application which is doing something wrong. I agree with Rob Prime that fixing that would be the appropriate thing to do.
Guy Harel
Greenhorn

Joined: Oct 21, 2009
Posts: 8
Well its a C++.NET DLL which uses the framework-loaded XML file "MyApp.exe.config", but indeed the bug comes from retreiving attributes in the non framework section of the XML. So not a bug in .NET. Thanks
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: org.w3c.dom.* saves my XML with attributes in alphabetical order
 
Similar Threads
Overwriting a specific XML section
XML doument to a string
File Output stream adding extra character while writing
Problem Overwriting XML Section
Getting length(no of bytes) of Dom document which is in memory