A website by Jeffrey Veen more →
12 Dec 2003
While I like XSLT a lot, I found that by using the Perl XPath module, the script almost wrote itself. Anyone familiar with URLs will pick up XPath in an instant. You just enter the path of /the/tag/you/want/, ask for either the text() inside the tag or one of its @attribute, then stuff it in a variable. Easy! So here is the script I’m using now. It pulls the XML over (now with verification that links were posted), turns it into XHTML, then sticks it into MovableType and rebuilds the site. You could easily just chop off the MT stuff at the end and just write it to a file, as well. Bear in mind that this represents about twice as much Perl as I’ve ever written before. But it seems to work. Comments please.