[jdom-interest] simple question

Justin Wall jwall at interactivesites.com
Tue Jul 31 15:50:46 PDT 2001

         Thanks for the reply!  I'm not importing the w3c package.  I have 
one demo I've written from some online examples and in that I just needed 
to use "Element" to describe a JDOM element, as in "public static String 
InsertActionParser(Element ia)".  However, now I'm writing a seperate class 
of my own and I can't do the same thing without the compiler returning an 
error about the passed variable.  To fix it I used "org.jdom.Element".  I 
don't understand why.

I'm wondering if these lines in the demo had something to do with it:

                 /** Test getting DOM Element from JDOM Element*/
                 org.w3c.dom.Element domElement = 
                 /** Test getting JDOM Element from DOM Element*/
                 org.jdom.Element jdomElement = domBuilder.build(domElement);

                 Element Actions = jdomElement.getChild("Actions");
                 (notice I didn't have to use org.jdom.Element here)

Did getting the root element and building a DOM allow "Element" to be used?

This is what my new class uses:

                 import org.jdom.*;
                 import java.util.*;

                 public class deleteAction
                         /** constructors */
                          * parser constructor for deleteAction element
                          * takes an element as defined by JDOM and builds 
deleteAction object
                         public deleteAction(org.jdom.Element d)

Thanks again,


At 03:31 PM 7/31/01 -0700, you wrote:
>If you are importing the org.w3c.dom package in your class, then replace
>public static List tablesParser(org.w3c.dom.Element tb1)
>-----Original Message-----
>From: Justin Wall [mailto:jwall at interactivesites.com]
>Sent: Tuesday, July 31, 2001 3:21 PM
>To: jdom-interest at jdom.org
>Subject: [jdom-interest] simple question
>         Sorry about this, I'm also new to Java, but  was wondering how
>to do
>this.  How can I just use "Element" as a class descriptor instead of
>I want to use:
>public static List tablesParser(Element tb1)
>instead of
>public static List tablesParser(org.jdom.Element tb1)
>Justin Wall
>To control your jdom-interest membership:

More information about the jdom-interest mailing list