in reply to A Question on a homebrew XML parser
I did not debug completely your code, although getting a depth of 135 for an element leads me to believe there is a problem somewhere, and the fact that it does not stop at the end of the file is a problem too, but here are a couple of comments:
My advice would be to do this "a-la-Xtreme Programming": write code that logs the parsing for one (or several) of the XML parsers (XML::Parser, XML::SAX::PurePerl, XML::Parser::Lite, XML::libXML) and then compare the output to what your code does, for small files, one file at a time. This will give you a reference and a goal for your parser.
When you feel pretty confident that your code works fine, then you can try it on the XML::Parser test suite and decide that after all you don't really need to write no stinkin' parser, as I did ;--(
|
|---|