This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

creating a new xml document with dom

 
andy yeo
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I got a real simple question.
I wanted to create a new xml document and then input elements to the document using dom.
My codes goes something like this:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try{
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.newDocument();

Element root=document.createElement("Pip3");
Element fromRole = document.createElement("fromRole");
..................
Is my codes going the right direction? If so how to name the xml file?Please advice. Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic