in reply to Parsing XML into a Hash

Could you bundle up a proper XML parser as part of your application? You wouldn't need to install it as a regular module, just have it sit alongside the rest of your program.

You do not want to do this with regexen. With Perl's extended regex system, it is possible to parse HTML/XML, but it's very ugly and probably quite a bit slower than the XS-based parser modules.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

: () { :|:& };:

Note: All code is untested, unless otherwise stated

Replies are listed 'Best First'.
Re: Re: Parsing XML into a Hash
by mcogan1966 (Monk) on Nov 03, 2003 at 18:06 UTC
    Would love to, if I knew how.
    I'm new to XML, so I know little about things like parsing it out and such.
      Start with the assumption that it is very non-trivial. You've got to simultaneously accomodate the right character set, quoting, conditional escaping, balancing, um, other ugly stuff I can't think of just now. That is, to be a proper XML parser anyway. Its worth the time to get the right software installed instead of faking it.