On Fri, Dec 14, 2007 at 12:48:55 +0200, Jason Elbaum wrote: > See, that's just the thing. I don't want to learn all that about XML, > at least not right now. I don't want to mangle it, transform it or > validate it.
I think Gaal's advice was sound then. Start with XML::Simple, and if you outgrow it only then bother learning more. XML::Simple is a bit like a serialization module, loading the entire XML into a native perl data structure. > I just want to parse a relatively small, relatively simple XML file > and easily extract the contents. I want to say, "Please give me the > contents of the foo attribute in all the bar tags which are nested > within baz tags with attribute quz." Or "Iterate over the fred tags > and give me their smludges". Your extraction requirements do sound like XPath would be a perfect fit though, so I do suggest you at least learn a bit about that. It's very simple and intuitive, and useful for things beyond XML - it's a general query language for trees (Tree::XPathEngine provides a reusable API for any tree). -- Yuval Kogman <[EMAIL PROTECTED]> http://nothingmuch.woobling.org 0xEBD27418
pgpw93OkuFDad.pgp
Description: PGP signature
_______________________________________________ Perl mailing list [email protected] http://perl.org.il/mailman/listinfo/perl
