Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Writing to XML file using DOM4j

 
Raj Vk
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic