This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, Im about to start work on an application in Java which reads and writes XML files. My current understanding is that there are many API's for Java which can parse XML. I was wondering if anyone out there could point me to any articles which compare and contrast these API's or could inform me directly of the pros and cons of each. Previously my experience with XML has been using the MSXML API on Windows. Thanks and Best Regards, Mark
hey mark, i knew SAX,DOM,JDOM,JAXP to parse xml. i`m just a beginner in java and xml, but i have some links for you: DOM http://www.jcpohl.de/technik/tut1dom.html http://www.w3c.com //this is the reference side including tutorials the main difference between DOM and SAX is, that DOM hold the XML in a tree structure and you can access to any level, node or childnode to any time. SAX parse the XML file line after line, so if SAX is in level 4 of the XML structure it`s impossible to access to level 2 or level 5. level 2 is parsed and lost and level 5 will be parsed. when the XML file is very big, the DOM parser needs a lot of resources of cpu and memory to hold it and then it`s better to use the SAX parser. at least you need a parser, i prefer xerces from apache. i hope this help`s. best wiches bernd
Joined: Dec 08, 2001
Hi Bernd, Thanks for the info. I'll probably give Xerces a look... Cheers, Mark