On Thursday, 29 August 2013 at 16:14:28 UTC, Michel Fortin wrote:
I wrote something like that a while ago.
It only accepted arrays as input because of the lack of a
"buffered range" concept that'd allow lookahead and efficient
slicing from any kind of range, but that could be retrofitted
in. It implements pretty much all of the XML spec, except for
documents having an internal subset (which is something a
little arcane). It does not deal with namespaces either, I feel
like that should be done a layer above, but I'm not entirely
sure.
Lower-level parser:
http://michelf.ca/docs/d/mfr/xmltok.html
Higher-level parser built on the first one:
http://michelf.ca/docs/d/mfr/xml.html
The code:
http://michelf.ca/docs/d/mfr-xml-2010-10-19.zip
That code hasn't been compiled in a while, but it used to work
very well for me. Feel free to use as a starting point.
Can you push it to the github, please?