File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Writing to XML file using DOM4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Writing to XML file using DOM4j" Watch "Writing to XML file using DOM4j" New topic
Author

Writing to XML file using DOM4j

Raj Vk
Greenhorn

Joined: Jun 01, 2011
Posts: 1
Hi Everyone,

I am parsing and generating new xml file using DOM4j api's. But problem is while generating new xml file the attribute names and the nodes are printing in alphabetical order. Is there any way to avoid this alphabetical order and maintain the old format of the XML.

Thanks in advance,
Raj
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19544
    
  16

Welcome to the Ranch!

Are you aware that for any good XML parser the order of attributes is irrelevant?

Anyway, I'll move this thread to our XML forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Writing to XML file using DOM4j
 
Similar Threads
Unicode Problem in Struts using dom4j for xml parsing
UPS Online Tools
JAXB - Ordering of elements in generated XML
XFire WebService generates WSDL elements in Alphabetical order
Xerces-2 Parsing to DOM and default attributes question