From: Jody G. <jga...@re...> - 2007-06-13 18:41:56
|
Hi Laura - I am sure most developers missed your question because you did not change the subject line. Our GML parser is very mean - it expects the schema to be *perfect*. I think hacks are being added to make it more forgiving - but usually, right now, the parser is correct. When I look at your file I see: - xmlns:myns="http://www.ttt.org/myns" Which is mapped to: - http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\Apache\cgi-bin\aware_wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=mallero&OUTPUTFORMAT=XMLSCHEMA Can you issue that request and see if it looks correct? Cheers, Jody Laura Díaz wrote: > Hi there, > i just downloaded the gt2-2.4-M3 version, i would like to parse a GML > file to get the FeatureCollection, > after adding the libraries in my classpath i tried to execute this > piece of code: > InputStream input = new FileInputStream(new File(gmlFile)); > Configuration configuration = new GMLConfiguration(); > > configuration.getProperties().add(Parser.Properties.PARSE_UNKNOWN_ELEMENTS); > > org.geotools.xml.StreamingParser parser = new > org.geotools.xml.StreamingParser( configuration, input, > "//featureMember" ); > DefaultFeature feature = (DefaultFeature) parser.parse(); > where the gmlFile is the attached file, i open this GML with other gml > readers and it seems to be ok, i can visualize it with gvSIG > I get this exception: > 12-jun-2007 18:24:33 > org.geotools.xml.Schemas$SchemaLocationResolverAdapter > resolveSchemaLocation > ADVERTENCIA: Could not resolve schema location: > ../../filter/1.0.0/filter.xsd to physical location. > 12-jun-2007 18:24:33 org.geotools.xml.impl.ParserHandler startElement > ADVERTENCIA: Error parsing: > http://schemas.opengeospatial.net/wfs/1.0.0/WFS-basic.xsd > > any ideas? > > thanks > Laura. > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ------------------------------------------------------------------------ > > _______________________________________________ > Geotools-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-devel |