[jdom-interest] using XMLFilter

Wagner Stefan AII/Wien Stefan.Wagner at aiinformatics.com
Fri Jul 13 08:36:28 PDT 2001


I would like to wirte a simple filter that removes som Tags form the input
file. I don't understand how to set up the filter.
Something is missing because I get an empty document. 
The jdom-b7 examples have not been helpfull to me. 
I think I need to set a parent XMLReader when constructing the XMLFilterImpl
but I have no idea where to find a parent.

Public  Document input ( File in_file )
  Document in_doc;
  SAXBuilder builder = new SAXBuilder ();

  // testing 
  builder.setXMLFilter ( new org.xml.sax.helpers.XMLFilterImpl () );

   in_doc = builder.build ( in_file );
  catch ( JDOMException e )
   System.out.println ( "Reading source file: JDom Error" );
   e.printStackTrace ();

  return in_doc;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20010713/6a49dee1/attachment.htm

More information about the jdom-interest mailing list