aspose file tools*
The moose likes XML and Related Technologies and the fly likes Journal Article - The Trail Guide - The three rules of using XML and Java 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 "Journal Article - The Trail Guide - The three rules of using XML and Java" Watch "Journal Article - The Trail Guide - The three rules of using XML and Java" New topic
Author

Journal Article - The Trail Guide - The three rules of using XML and Java

Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
The just-released September 2004 edition of The JavaRanch Journal includes an article by Paul Wheaton, "The Trail Guide - The three rules of using XML and Java".

Please use this thread to comment on and discuss the article.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Daniel Mayer
Ranch Hand

Joined: Sep 09, 2004
Posts: 103
Personally, I prefer Dom4J over JDom. It seems to have the more complete API, while still coming natural to a Java developer.

And I see one drawback using an XML-serializer like XStream - The XML structure is only implicitely defined by the object structure, so by refactoring your design, you can accidentally become incompatible to prior versions.

For things like configuration files I therefore prefer to define the XML structure via a schema and let the java classes be generated from it; for example using JAXB.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Paul, thanks for mentioning XStream. I'll be able to put this to good use. Oh wait, we aren't suppose to use XML are we?


GenRocket - Experts at Building Test Data
Vladas Razas
Ranch Hand

Joined: Dec 02, 2003
Posts: 385
Haha, I fell at rule 2 and 3. Using regular DOM... But it was worth it because I better understood XML now. Had to deal with whitespace text nodes etc myself

Regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Journal Article - The Trail Guide - The three rules of using XML and Java