// instantiante parsers and content handlers
FilterHandlerImpl contentHandler = new FilterHandlerImpl();
FilterFilter filterParser = new FilterFilter(contentHandler, null);
GMLFilterGeometry geometryFilter = new GMLFilterGeometry(filterParser);
GMLFilterDocument documentFilter = new GMLFilterDocument(geometryFilter);
// read in XML file and parse to content handler
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
ParserAdapter adapter = new ParserAdapter(parser.getParser());