Processing XML with Perl
Author: Mark Overmeer
In the professional computer world, XML is prefered to exchange information between applications. Most commercial applications use well defined XML, with strict data types. This works well with strictly typed languages like Java, but is much harder to handle with dynamic languages like Perl and PHP. Do we add a type system to our untyped languages to be able to process XML well?
Perl has a long history as glue language, making databases, websites and the operating system work together with little effort. It has many modules to process XML, but they are either processing XML without strict datatypes or add explicit types and "manual" node processing. The rather new XML::Compile suite, however, is strictly following rules defined by schemas without hassle.
XML::Compile takes a different approach: it leaves Perl typeless and handles XML strict. XML Schema definitions are used to bridge the gap. Passing simple data to a code reference is enough to talk the protocol, both reading and writing. It can also produce examples automatically.
A few interfaces have been published already: SOAP client, SOAP server builder, GML, KML, XPDL, and XML-RPC. There are also quite a number of commercial products based on this module.
The presentation will not go deep into Perl, but mainly shows how typed and typeless data can be merged. It will show how the final products can be used... to get an impression on the power of the used programming techniques.