[jdom-interest] Problem with getText() / jdom b9 rc2

Bradley S. Huffman hip at a.cs.okstate.edu
Fri Apr 25 08:57:04 PDT 2003


Simon McLeish writes:

> SAXBuilder builder = new 
> SAXBuilder("org.apache.xerces.parsers.SAXParser", true);
> builder.setFeature ("http://xml.org/sax/features/validation", true);
> builder.setFeature ("http://apache.org/xml/features/validation/schema", 
> true);
> 
> // Read the document (a config file)
> Document doc = builder.build(in);
> 
> // Get the root element
> Element root = doc.getRootElement();

Echo out the root element to see what the content really is:

    XMLOutputter outputter = new XMLOutputter();
    outputter(root, System.out);

Brad



More information about the jdom-interest mailing list