<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<font color="#3333FF">Hi,</font>
<br><font color="#3333FF">Scroll down to see my comments.</font>
<p>Õcsi Balázs wrote:
<br>>
<br>> Hi everyone!
<br>>
<br>> I'm new in jdom. I need a little help.
<br>> I would like to create a new XML file with jdom.
<br>> But, when I try, to compile the file, I got a message. See below.
<br>> (I use the jdom-b6)
<br>>
<br>> Here is the compiler message:
<br>> -----------------------------------------
<br>> C:\My Projects\Java\jdom\JDOMDemo.java:26: cannot resolve symbol
<br>> symbol : method addProcessingInstruction
<br>> (java.lang.String,java.lang.String)
<br>> location: class org.jdom.Document
<br>> Document doc = new Document(new Element("setup",ns)).
<br>>
^
<p><font color="#3333FF">There is no "addProcessingInstruction()" method
defined in the Document class.</font>
<br><font color="#3333FF">You may use "addContent(ProcessingInstruction)"
method instead.</font>
<p>> C:\My Projects\Java\jdom\JDOMDemo.java:36: cannot resolve symbol
<br>> symbol : method setContent (java.lang.String)
<br>> location: class org.jdom.Element
<br>>
<br>> .addChild(new Element("page").addChild(new
<br>> Element("name").setContent("main"))));
<br>> ^
<p><font color="#3333FF">Again, there is no "addChild()" method defined
in the Element class.</font>
<br><font color="#3333FF">You may use "addContent(Element)" method inetead.</font>
<p>> C:\My Projects\Java\jdom\JDOMDemo.java:35: cannot resolve symbol
<br>> symbol : method addChild (org.jdom.Comment)
<br>> location: class org.jdom.Element
<br>>
<br>> .addChild(new Element("banner").addChild(new Comment("company"))
<br>> ^
<p><font color="#3333FF">Refer the answer for the above error.</font>
<br>
<br>> C:\My Projects\Java\jdom\JDOMDemo.java:33: cannot resolve symbol
<br>> symbol : method setContent (java.lang.String)
<br>> location: class org.jdom.Element
<br>>
<br>> .addChild(new Element("iexplorer", ns).setContent("Error message"))
<br>>
<br>> ^
<p><font color="#3333FF">Refer the answer for the above error.</font>
<p>> I don't know where these methods are.
<p><font color="#3333FF">Why don't you build the jdom API documentation(html)
somilar tp the one provided for any API (like JDK) and refer it for the
available methods in a class. You might have got the jdom source code with
you which is required to create the above mentioned documentation.</font><font color="#3333FF"></font>
<p><font color="#3333FF">Hope this will help.</font>
<p>Cheers,
<br>Selva</html>