Re: Xpath
Tim Brody <[email protected]> Tue, 11 Dec 2012 10:25:07 +0000
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <EMEW3|ad86d3e33da64cb2c5012f9d80ca0717oBAAPB04tdb2|ecs.soton.ac.uk|[email protected]> |
--===============0153627200== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-Ca/gk0ob8KaAb9oP8gTd" --=-Ca/gk0ob8KaAb9oP8gTd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable To use an analogy, XSLT is to XML what regexps are to text. Yes, it takes some time to get your head around but once you do it makes XML transformations quick to achieve. XSLT is flexible enough to be used procedurally or as pattern matching - "foreach" vs. "template". XML::LibXSLT also supports callbacks into Perl space, so you can mix and match XSLT and Perl in the same template. To work effectively with XML you should familiarise yourself with DOM, SAX and XSLT, then you can apply the best technology to the problem in hand. Otherwise, you can always use one of the modules that turns XML into native Perl structures ... -- All the best, Tim. On Tue, 2012-12-11 at 00:23 -0500, Tod Harter wrote: > It is a bit of a thing to wrap your head around, and XSLT is certainly > not the most friendly example of a functional language, but once you > do get a grip on it its kind of elegant. Really I think mostly I'd > like a non-xml syntax to use, that would make it a lot more fun. The > other thing is XSLT2 is a LOT nicer, but unfortunately probably will > never have an implementation with perl bindings.=20 >=20 > On Mon, Dec 10, 2012 at 9:14 PM, Thomas Krichel <[email protected]> > wrote: > Tod Harter writes > =20 > > IF you know XSLT (or if you're going to learn it anyway > there's > > no time like the present). Its a useful language to know. > =20 > =20 > Coming from Perl, I found it hard to learn as you have > to unlearn procedural thinking. > =20 > Cheers, > =20 > Thomas Krichel > http://openlib.org/home/krichel > =20 > http://authorprofile.org/pkr1 > skype: > thomaskrichel > =20 >=20 >=20 >=20 > --=20 > The Wise adapts himself to the world. The Fool adapts the world to > himself. Therefore, all progress depends on the Fool. > _______________________________________________ > Perl-XML mailing list > [email protected] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs --=-Ca/gk0ob8KaAb9oP8gTd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQEcBAABAgAGBQJQxwoDAAoJECwwMWpSkLVchiUIALAZe67YtcTqYUh90xMNjsfL p8oAM1GmoahsiD9rCEC+FIRIGcJYkTWKnQZGxVRHvYpJ1km6e+xrHDIhURqFfVoP JC3z0OMjaN7A3z8it+CWVVpdzmgrRq5CdPfNW7TyvZILQRkHQJ4cmw2wqUN9ZOTj KyC+/zAN/R+PnUFc1+gN7QAv4jtkxGyXDbHVobNThVuabDsEi1r/aznpxhzejJnW meJwCOtkHVIQXN/n0hSchWE+Lo2nw25Oqzh3E3Kunx6LO2FgylS2DZkhpoPQ4u+3 p3dMTxQyw18Uspa/YcxF+QVctLFNvSKJg/SPw35+j0BKqF9JVh7caQTEAGkhXYc= =U5EK -----END PGP SIGNATURE----- --=-Ca/gk0ob8KaAb9oP8gTd-- --===============0153627200== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs --===============0153627200==--