Hello,

I would like to parse GML document, create FeatureCollection and render them in 
JMapPane.
I found one example on how to do this on: 
http://docs.codehaus.org/display/GEOTDOC/GML+XML+Support and follow them.

However when i try to parse some gml document i got following exceptions:

Apr 11, 2009 7:29:06 PM org.geotools.xml.impl.ParserHandler startElement
INFO: Could not find declaration for: 
{http://ogr.maptools.org/}FeatureCollection. Creating a mock element 
declaration and parsing anyways...
Apr 11, 2009 7:29:06 PM org.geotools.xml.impl.ParserHandler startElement
INFO: Could not find declaration for: 
{http://ogr.maptools.org/}geometryProperty. Creating a mock element declaration 
and parsing anyways...
Apr 11, 2009 7:29:06 PM org.geotools.xml.impl.ParserHandler startElement
INFO: Could not find declaration for: {http://ogr.maptools.org/}AREA. Creating 
a mock element declaration and parsing anyways...
Apr 11, 2009 7:29:06 PM org.geotools.xml.impl.ParserHandler startElement
INFO: Could not find declaration for: {http://ogr.maptools.org/}PERIMETER. 
Creating a mock element declaration and parsing anyways...
Apr 11, 2009 7:29:06 PM org.geotools.xml.impl.ParserHandler startElement
INFO: Could not find declaration for: {http://ogr.maptools.org/}PACEL_. 
Creating a mock element declaration and parsing anyways...
...
(this is only one part)

org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence.
        at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown 
Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.geotools.xml.Parser.parse(Parser.java:180)
        at org.geotools.xml.Parser.parse(Parser.java:140)


There is adequate schema file in same folder where is my .gml file.

Can someone tell me what problem is and how to fix it?

Also i would appreciate if someone can give me example for parsing GML file 
with Geotools that works, with example .gml and .xsd files.


Thanks.

-- 
View this message in context: 
http://n2.nabble.com/GeoTools-Parsing-GML-document-tp2621340p2621340.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to