[OSM-dev] Osmosis on Australia extract

Brett Henderson brett at bretth.com
Sat Nov 8 22:24:48 GMT 2008


Richard Chirgwin wrote:
> Hi,
>
> I'm trying to load the Australian OSM extract found here:
> http://www.osmaustralia.org/osmausextract.php
>
> Into a MySQL database using Osmosis. The failure (short version here,
> long below signature) is:
>
> Unable to parse xml file /home/richard/Desktop/australia.osm. 
> publicId=(null), systemId=(null), lineNumber=8043380, columnNumber=1.
>         at
> com.bretth.osmosis.core.xml.v0_5.XmlReader.run(XmlReader.java:114)
>         at java.lang.Thread.run(Thread.java:619)
> Caused by: org.xml.sax.SAXParseException: XML document structures must
> start and end within the same entity.
>
> Any ideas?
>   

Perhaps the xml file has been truncated.  Can you check the last lines 
of the file to make sure the xml file has been closed correctly?  The 
program creating the file may have crashed half way through the file 
creation.

A command like tail should be able to do this for you.  There are other 
tools like xmlstarlet that might also help to validate xml files but I 
haven't used them before.

Brett





More information about the dev mailing list