Exercises, examples and other material relating to training module P668. This topic is presented on public course Perl for Larger Projects
The Extensible Markup Language (XML) is an important tool in structuring data. This training module covers the two major XML engines that are supported by Perl modules, and teaches you how to program using them. We also cover handling XSLT in Perl.
Related technical and longer articlesUsing LWP to write Web Clients
|Articles and tips on this subject||updated|
|3874||Using Perl to read an RSS feed off a web site and extract data - via LWP and XML modules|
Perl is excellent glue-ware ... something I was reminded of towards the end of Friday's Perl Programming Course. A delegate asked me how easy it is to grab an XML resource from the web (such as an RSS feed) and extract data from it. Well - you could write the code yourself, or you could use standard ...
It's incredible just how much time bookkeeping takes - small adjustments to the various resources we have, tidying up modules that are no longer relevant and pointing any visitors at replacements. There' been a lot of that going on over the last couple of days ... for example:
1. I have deleted two ...
|2378||Handling XML in Perl - introduction and early examples|
There are hundreds of modules (literally) in Perl for handing XML. Some of them are highly specialised, but others are of much more general use in reading (and in some cases writing) XML streams.
(definition of XML: Extended Markup Language - a tagging system in plain text for marking up data; not ...
Examples from our training material
|apps-admin.xml|| Sample data file used in XML example|
|camels.xml|| XML sample for xslt1 demo|
|camels.xsl|| XSLT sample for xlst1.pl demo|
|exp.pl|| Direct use of the Expat module |
|gnome.pl|| Parsing XML through LibXML|
|goblin.pl|| Altering an XML document through LibXML|
|index.xml|| Sample RSS data feed (XML data)|
|medireport.pl|| Using XML::Parser to extract information - practical example|
|mediweb.pl|| Parsing XML within a cgi script |
|medline.pm|| Class of XML element handlers|
|p1|| SAX parser - extracting titles from XML stream|
|p2|| Using XML::Parser to transfer an XML structure to memory|
|stdsubs.pm|| Standard cgi handler to collect form data|
|xml0.pl|| Parsing XML - first test program|
|xml1.pl|| Using debug mode to quickly check a document|
|xml2.pl|| Using Subs to report on an XML source|
|xml3.pl|| Illustration of handling a stream|
|xml4.pl|| Converting an XML document into a tree in Perl collection variables|
|xml5.pl|| Alternative - using handlers|
|xslt1.pl|| Using XML and XSLT to turn data into a web page|
Some modules are available for download
as a sample of our material or under an Open Training Notes License
for free download from [here]
Topics covered in this module
What are XML, XSLT, DTD, Schema etc.?
Installation of modules and support libraries.
The Expat and Gnome libraries.
XML::Parser and XML::Parser::Expat.
Parser principles; styles and event-based handlers.
Editing and rewriting XML.
XML Style Sheet transforms with XML::LibXSLT.
Case Study - a system to extract XML data and generate fixed field records.
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule
Well House Consultants specialise in training courses in
. We run
throughout the UK (and beyond for longer courses), and
at our training centre in Melksham, Wiltshire, England.
It's surprisingly cost effective to come on our public courses -
even if you live in a different
country or continent to us
We have a technical library of over 700 books on the subjects on which we teach.
These books are available for reference at our training centre.