XML and Perl

ajt on 2002-10-24T21:04:44

I like XML, I may have mentioned this before..... I like it for a number of reasons, one of which being it's easy to get at it with XPath, and another is it's easy to convert with XSL-T. The nice thing that Perl does is, I can use it to manipulate XML, with XPath and XSL-T very easily, in a sane Perl environment. The Java crowd think XML belongs to them, but I think Perl is a good tool to work on XML, and in some ways an even better... (Think LibXML and LibXSLT).

This week I've been working on my RSS module, getting a new release ready. While reading The Register I spotted a link to Portable Application Description an XML format for describing software's licence terms and conditions. It looks easy enough, and there is even a Perl script that can convert PAD XML to HTML. To my horror it's a brute force XML to HTML tool, that uses no XML parser, no strict, and prints out it's own HTML.

If you ask me all you need is an XSL style-sheet, a PAD source file, and you should be able to transform it with any XSL-T engine you want. Okay a simple Perl script can do this for you, but it's something that the excellent Perl XSL-T modules do for you, not something you code yourself in Perl......