[gdal-dev] Unable to convert Shape file from GML file (ERROR 1: XML Parsing Error:)

Frank Warmerdam warmerdam at pobox.com
Wed Feb 3 13:50:10 EST 2010


vadi_nabble wrote:
> Hi,
>  I am trying to learn OGR APIs.
>  For that i took "ogr2ogr.cpp" file from (gdal-1.6.3\apps) and successfully
> build the exe.
> 
>  I was able to successfully convert Shape file to GML using following
> command:
>  <myexefilename> -f "gml" output.gml input.shp
> 
>  However, when i am trying the reverse of that, means from GML to Shape
> using following command:
>  <myexefilename> -f "ESRI Shapefile" output.shp input.gml
> 
>  I am getting the following error:
>  ERROR 1: XML Parsing Error: unable to connect  socket for  URL
> 'http://schemas.opengeospatial.net/gml/2.1.2/feature.xsd'
> 
>  ERROR 1: XML Parsing Error: fatal error during schema scan

Vadivelan,

It appears that the Xerces XML parsing library is attempting to fetch the
GML schemas to do validation of the GML, and is failing.  The url is
valid and has a document.

I *thought* that we disabled validation by Xerces by default.  Reviewing
gdal/ogr/ogrsf_frmts/gml/gmlreader.cpp and the makefile.vc and GNUmakefile
in that directory, it does appear validation should be disabled by default
so I'm surprised at the problem you see.

If you are interested in following up on this, please file a ticket, and I'll
have Chaitanya go through it with you.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list