Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: XML::parser question

by Hrunting (Pilgrim)
on Oct 24, 2002 at 12:40 UTC ( [id://207679]=note: print w/replies, xml ) Need Help??


in reply to Re: XML::parser question
in thread XML::parser question

It's important to note that XML::Simple has been ported to the XML::SAX API (as XML::SAX::Simple). This means you can get the ease of use of XML::Simple with the benefits of XML::SAX. One of the chief benefits is that you can use other parsers besides expat (the parser XML::Parser uses). expat is notoriously inefficient as an XML parser. libxml2 (the C library at the core of XML::LibXML) is much faster, and has already been ported to the XML::SAX API. So if you used XML::LibXML as your parsing library and XML::SAX::Simple as your parser, you could get a very fast, very easy solution to this problem.

Replies are listed 'Best First'.
Re: Re: Re: XML::parser question
by grantm (Parson) on Oct 24, 2002 at 20:10 UTC

    Actually, you don't need XML::SAX::Simple - matts put that quick hack together while I was integrating SAX support directly into XML::Simple. Version 1.08_01 of XML::Simple supports SAX natively. It can act as a handler in the way you suggest, it can also drive a SAX pipeline from a Perl data structure and it can do both at the same time for filtering.

      Ahh, that's great. Release it on CPAN so the rest of the world can view it. All I see is 1.08.
        Release it on CPAN so the rest of the world can view it.

        XML::Simple version 1.08_01 has been on CPAN since February. The CPAN shell recognises a _nn suffix to mean that a release is an 'unstable' version (thanks to samtregar for pointing this feature out to me). If you type this command in the CPAN shell ...

        cpan> install XML::Simple

        ... then you'll get the latest stable version (without an underscore suffix). However you can install a specific version like this ...

        cpan> install G/GR/GRANTM/XML-Simple-1.08_01.tar.gz

        And you can list available versions with the 'author' command ...

        cpan> a GRANTM

        The 1.08_01 release has proven to be so stable that I haven't had a pressing need to re-release it with a new version number. I will though.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://207679]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-03-28 11:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found