• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

parsing Document back to XML

 
Ranch Hand
Posts: 72
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
I have parsed a .xml file using DOM (sun's JDK 1.4.1) and added few more attributes to the nodes there.
Is it possible to retrieve a .xml file from the Document I have created with the new attributes?
If yes, how? If no, whats the best alterantive to do that?
thanks and regards
Ravee.
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My guess is you want to save the new modified xml document to a file.
If my guess is correct, here is the sample code for you.
DOM example:
http://bobcat.webappcabaret.net/javachina/faq/xml_java_01.htm#jaxp_dom_Q35
jdom example:
http://bobcat.webappcabaret.net/javachina/faq/xml_java_01.htm#jaxp_jdom_Q36
 
Ravee Bhat
Ranch Hand
Posts: 72
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks A lot Roseanne, your guess is correct.
Now I have got it working using Apache Xerces.
http://www.ibiblio.org/xml/books/xmljava/chapters/ch13.html
thanks and regards
Ravee.
 
Time is the best teacher, but unfortunately, it kills all of its students - Robin Williams. tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic