you can use JDOM API to process the xml files. it has the features of bothSAX and DOM. goto http://jdom.org and read the faq. i think jdom will give you abetter solution.