[OSM-dev] SAX XML parsing recommendations?

Immanuel Scholz immanuel.scholz at gmx.de
Mon Jul 10 21:57:07 BST 2006


Hi,

> REXML (Ruby): seems to work, but takes a long time (27 hours to get the UK
> out of the April planet.osm.

Yiik! I use REXML for little-osm (in
svn.openstreetmap.org/utils/little-osm) and it "only" takes 6 MB of memory
and take about 2 hours to read the april's planet.osm (it cannot read the
newest, since it contain broken ways).

JOSM uses MinML2, which is reasonable fast, but in Java. ;-) The source
for this parser is in
http://www.eigenheimstrasse.de/svn/josm/src/org/openstreetmap/josm/io/OsmReader.java


> Ideally it would be in php, ruby, c++ but I'm willing to try anything....

The server code uses libxml somewhere to create XML data. Maybe you get it
to work for SAX parsing...

Ciao, Imi





More information about the dev mailing list