wood burning stoves 2.0*
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Writing to XML file using DOM4j" Watch "Writing to XML file using DOM4j" New topic

Writing to XML file using DOM4j

Raj Vk

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,
Rob Spoor

Joined: Oct 27, 2005
Posts: 19656

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.

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
XFire WebService generates WSDL elements in Alphabetical order
Xerces-2 Parsing to DOM and default attributes question
JAXB - Ordering of elements in generated XML