[jdom-interest] org.jdom.Builder?
Ian Lea
ian.lea at blackwell.co.uk
Tue Nov 13 01:32:09 PST 2001
Use org.jdom.input.SAXBuilder.
import java.io.File;
import org.jdom.Document;
import org.jdom.input.SAXBuilder;
public class JDOM {
public static void main(String[] args) throws Exception {
SAXBuilder builder = new SAXBuilder();
Document jdoc = builder.build(new File(args[0]));
}
}
Can also build from Streams, Readers, etc.
There is a DOMBuilder as well but SAXBuilder is recommended
in most cases. Have you perhaps got the 1st. edition of
Java & XML? Can't see any mention of the Builder interface
in the 2nd. edition. In fact I don't recall it ever being there
but perhaps it was.
--
Ian.
ian.lea at blackwell.co.uk
youngji kim wrote:
>
> Hi,
>
> After I have read JDOM chapter of the JAVA/XML book, I tried the example
> from the book.
>
> But, I'm keep getting an error because I have imported
> org.jdom.input.Builder interface. After looking at the JDOM Doc, it seems
> like there is no interface or class called "Builder" in JDOM-b7. (Even the
> Deprecated section didn't have any info about "Builder")
>
> I think I have missied something really important.
> Can any one help me?
>
> Thank you,
> Youngji Kim
More information about the jdom-interest
mailing list