[jdom-interest] Re: DOMBuilder

Joseph Bowbeer jozart at csi.com
Tue Mar 6 14:58:32 PST 2001

I spoke too soon (before testing).  There's a back door, but it's not open
until build() is invoked.

In the sample code below, the filter doesn't have an XMLReader parent at the
time setFeature is invoked, causing setFeature to fail.  The XMLFilter isn't
connected until build() is invoked.

----- Original Message -----
From: "Joseph Bowbeer" <jozart at csi.com>
Cc: <jdom-interest at jdom.org>
Sent: Tuesday, March 06, 2001 2:13 PM
Subject: Re: DOMBuilder

By the way, there already is a backdoor that can be used to set arbitrary
features on JDOM's XMLReader.

    import org.xml.sax.XMLFilter;
    import org.xml.sax.helpers.XMLFilterImpl;

    SAXBuilder builder = new SAXBuilder();
    XMLFilter filter = new XMLFilterImpl(); // backdoor
    filter.setFeature("whatever", true);
    Document doc = builder.build(in);

--- original message ---
From: Rosen, Alex arosen at silverstream.com
Date: Tue, 6 Mar 2001 12:56:50 -0500

> What DOM properties are you setting?
> What SAX properties do you want to set?


More information about the jdom-interest mailing list