[jdom-interest] Comment

sai reddy saireddy at hotmail.com
Mon Oct 22 06:41:56 PDT 2001


Hello,
This is in reference tomy earlier mail which is below i have added the line 
but still the problem error with an error
Constructor Document(java.util.List)not found in jdom.org.Document.

The lines which I have added are

List docContent = new Vector();
      docContent.add(comm);
      docContent.add(root);
      doc  = new org.jdom.Document(docContent);
           doc  = new org.jdom.Document(root);
      doc.addContent( comm );
Any Body having any ideas? Why Iam getting the error.

Thanks.

Reg,
sai





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