[jdom-interest] Hello
sai reddy
saireddy at hotmail.com
Fri Oct 19 08:09:27 PDT 2001
Hello,
I am using JDOM to create a new XML file and I am able to do that. My
problem is I have to write down the comments at the top while i am getting
the comments at the bottom. I am sending the code .
org.jdom.doc = new Document(root);
org.jdom.doc.addContent( comm );
org.jdom.doc.setDocType( new org.jdom.DocType("group", "group.dtd"));
org.jdom.Comment comm = new Comment("DEMO XML Program");
org.jdom.Element trgrp = new org.jdom.Element("Group");
trgrp.addAttribute("description", "group");
org.jdom.Element lang = new org.jdom.Element("lang");
lang.setText("School Children");
trgrp.addContent(lang);
root.addContent(trgrp);
I am getting the output xml doc as
XML
DocType
Objective
Comment
While I want it as
XML
DocType
Comment
Objective
Thanks in advance.
Reg,
sai
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
More information about the jdom-interest
mailing list