[plt-scheme] Wrote a prelimary xml-pulling parser --- suggestions?
Hi everyone,
I was so bothered by a lack of a pull-style parser for handling large xml
files that I've cooked something up:
http://hashcollision.org/svn/repos/projects/xml-pull/xml-pull.ss
(Dependency: this uses my generator 2.0 PLaneT package which should be up
on PLaneT soon, but until then, the package can be found in:
http://hashcollision.org/tmp/generator.plt)
xml-pull is somewhat based on Python's "pulldom" module. The idea is to
use SSAX to progressively do an event-driven traversal of the XML tree by
using pull-event. At a point where the tree gets interesting, the user
can call pull-sexp to get the XML subtree at that point. This can be very
useful if an XML ile contains a long sequence of structured items.
It's still very rough and undocumented code, but I wanted to know if
anyone else is interested in this. I'll continue to polish this up, and
suggestions would be greatly appreciated.
Best of wishes!