This week's book giveaway is in the Testing forum. We're giving away four copies of Practical Unit Testing with TestNG and Mockito and have Tomek Kaczanowski on-line! See this thread for details.
Hi, I have started to look into java API's for XML parsing. My current need in my project is to take XML file, construct a JTree out of it, display it , allow users to manupulate the JTree and finally manipulate the XML file accordingly. DOM/JDOM API seems to be the best fit for me. I understand that we can use parse method to obtain a Document object. But I did not find any API like XMLWriter which will convert the Document back to XML file. (I'm not talking about output to the screen) I know that by using XMLOutputter with JDOM package or by creating our own XMLOutput class we can write to the modified Document object to the same file, but I want a more obvious solution like a parse call, which takes a Document object as input and gives a XML file. Could you please help me??? Thanks, Sony [This message has been edited by sony gam (edited June 20, 2001).]
Ajith Kallambella
Sheriff
Joined: Mar 17, 2000
Posts: 5781
posted
0
Take a look at my answer for a similar question in an older post. Hope that helps you too! ------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. IBM Certified Developer - XML and Related Technologies, V1.
Open Group Certified Master IT Architect.
Sun Certified Architect(SCEA).