March 22, 2000
Few projects can hope for the kind of uptake that Sean McGrath's Pyxie received after his XML.com article last week. Within a few days, both Perl and Java implementations of PYX processors had emerged.
Matt Sergeant worked fast to create XML::PYX, a Perl module and several related utilities. XML::PYX::Parser is an XML parser that outputs PYX notation.
Using XML::PYX and other XML modules, Sergeant created the following three utilities:
- pyx - a XML to PYX converter
- pyxv - a validating XML to PYX converter
- pyxw - a PYX to XML converter
The first two utilities are effectively Perl reimplementations of McGrath's xmln and xmlv.
XML::PYX can be obtained from your local CPAN mirror.
Michel Rodriguez, who keeps a web site with examples of Perl and XML usage, followed up Sergeant's release of XML::PYX with a sample application. His program uses PYX notation and Perl regular expressions to transform an XML version of the Quran.
Java PYX support
Shawn Silverman worked over the weekend to produce Java utilities that provided SAX compatibility for PYX.
PYXToSAX is a SAX-compatible parser for PYX notation. Any application that takes a stream of SAX input events can utilise PYX by using this parser.
SAXToPYX contains a SAX DocumentHandler, which produces a PYX output file from SAX events. Used as a standalone program, it provides the same functionality as the xmln and xmlv utilities.
PYX's simplicity and its potential for leveraging line-oriented utilities like grep with XML have certainly caught the imagination of XML developers. Rodriguez's example shows that the user of regular expressions within Perl programs can also benefit from the PYX notation.
If you're working on XML projects like Pyxie and think the world would like to hear about you, get in touch with me at email@example.com.