• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Convert DOM Document back to XML file

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!