• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

org.w3c.dom & save xml documents

 
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I know , this hs nothig to do with the "certification" but it has with xml.
I use from java the org.w3c.dom.Document to create a xml Document, but
I don't know how to save it.
ThankX
 
Ranch Hand
Posts: 578
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi mihai,
can you explain it in detail a little more ?
are u loading teh xml file, making modifications , but not able to store ( i had written paste before instead of store ..sorry abt that ..guess i was sleepy ) it ?
it would be great if you could paste your java code here !!!
looking forward to that
hari
[ March 26, 2004: Message edited by: Hari Vignesh Padmanaban ]
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I create the dom document using
javax.xml.parsers.DocumentBuilder.parse(File f)
where f is a new file(f = new File())
I use the document like
doc.createAttribute(..
...
But how I save it ?
 
Hari Vignesh Padmanaban
Ranch Hand
Posts: 578
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess that you have to use the transformer factory to write it to disk
Here is the code snipet


do go through the related API's
hope this helps
[ March 26, 2004: Message edited by: Hari Vignesh Padmanaban ]
[ March 26, 2004: Message edited by: Hari Vignesh Padmanaban ]
 
Life just hasn't been the same since the volcano erupted and now the air is full of tiny ads.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic