[jdom-interest] Comment

sai reddy saireddy at hotmail.com
Sat Oct 20 16:14:10 PDT 2001

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 .
Any body has any ideas why is it so?

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");
org.jdom.doc = new Document(root);
org.jdom.doc.addContent( comm );
org.jdom.doc.setDocType( new org.jdom.DocType("group", "group.dtd"));

Thanks in advance.


Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

More information about the jdom-interest mailing list