So that you know, the parsing goes through without problems. ExcuteHandler also handles start(), end() and characters() and reads in the document just fine.. But the geometry() method never gets called. I checked that MultiLineString is indeed a type that would be handled by the geotools code.
I'm clueless? Jonas On Thu, 2006-03-16 at 13:05 +0100, Jonas Johansson wrote: > On parsing a Geometry, what is it that I don't understand here? > > If my ExecuteHandler implements the method geometry(Geometry g), and the > reader is reading some XML-stream containing the following extract: > > .... > > <ComplexValue schema="http://foo.bar/gml_polygon_schema.xsd"> > <MultiLineString srsName="EPSG:4269"> > <lineStringMember> > <LineString> > <coordinates>-106,38 -106,35</coordinates> > </LineString> > </lineStringMember> > <lineStringMember> > <LineString> > <coordinates>-115,38 -115,35</coordinates> > </LineString> > </lineStringMember> > </MultiLineString> > </ComplexValue> > > .... > > why isn't the method geometry ever called while parsing? > Basically, I set up the parser in this order: > > InputSource requestSource = new InputSource(reader); > ExecuteHandler contentHandler = new ExecuteHandler(); > GMLFilterGeometry geometryFilter = new > GMLFilterGeometry(contentHandler); > GMLFilterDocument documentFilter = new > GMLFilterDocument(geometryFilter); > SAXParserFactory factory = SAXParserFactory.newInstance(); > SAXParser parser = factory.newSAXParser(); > ParserAdapter adapter = new ParserAdapter(parser.getParser()); > adapter.setContentHandler(documentFilter); > adapter.parse(requestSource); > > Thanks for any help! > > Jonas ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
