I'm not sure what XML::Rules is using under the hood, but how do you know XML::SAX is using XML::SAX::ExpatXS? It might be using the PurePerl Parser, and so would be extremely slow. The alternative to XML::Parser (which uses expat) is XML::LibXML (which uses libxml) at the low level. Everything else is just wrappers around those, and bound to be 'slower', but possibly easier to use for your specific problem.
Update: XML::Rules uses XML::Parser::Expat...but since it's a wrapper around Expat, it would be slower than the XML::Parser::Expat module alone...but faster/slower would not be the point of using XML::Rules over XML::Parser::Expat in the first place.
When I ran your XML::SAX code, it used XML::LibXML (via XML::LibXML::SAX) under the hood, but then, I have XML::LibXML installed, and ParserDetails.ini is set to use it.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.