   Java, reading and writing XML, which api?
  I need to read and write xml files, I'm after a tree-like hierchical approach.I've been looking at the java site which list lots of apis to choose from, I'm not sure which one to use.egJAXP, JAXB, JDOM, DOM4J ....thx   
  DOM is what you are looking for.It stands for "Document Object Model".It interprets a XML file like a tree,every XML element becomes a node,the elements which lie inside a node become its children etc.. The DOM mechanism is a subset of the JAXP API.http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/TOC.htmlHere,on this page, the link "Part III: XML and the Document Object Model (DOM)" leads to useful pages which could be of your interest.   ;  I'd suggest to forget the ugly and bloated standard apis altogether and just use NanoXML lite which consists of only one simple class.   