Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact

Related technical and longer articles
Using LWP to write Web Clients
Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
Perl module P668
Handling XML in Perl
Exercises, examples and other material relating to training module P668. This topic is presented on public course Perl for Larger Projects

Perl for Larger Projects - Objects, huge data, SQL databases, XML, efficiency and other topics. This advanced course takes the Perl programmer through ...
http://www.wellho.net/course/plfull.html  [course]
As well as running server side scripts (through CGI, modPerl or ASP) and many uses independent of networks, Perl can be used to write server processes, ...
http://www.wellho.net/solutions/perl-usi ... ients.html  [longer article]
#!/usr/bin/perl use XML::LibXML; $parser = new XML::LibXML; $struct = $parser -> parse_file("apps-admin.xml"); $rootel = $struct -> getDocumentElement(); ...
http://www.wellho.net/resources/ex.php4?item=p668/gnome.pl  [code sample]
#!/usr/bin/perl use XML::Parser; $parser = new XML::Parser(Style => "Subs", Pkg => "medline", Handlers => {Char => \&medline::baretext} ); $parser ...
http://www.wellho.net/resources/ex.php4?item=p668/medireport.pl  [code sample]
#!/usr/bin/perl use XML::Parser; $parser = new XML::Parser(Style => "Tree"); $struct = $parser -> parsefile('apps-admin.xml'); displaylist("",$struct); ...
http://www.wellho.net/resources/ex.php4?item=p668/xml4.pl  [code sample]
#!/usr/bin/perl # Direct use of Expat - an example use XML::Parser::Expat; $parser = new XML::Parser::Expat(); $parser -> setHandlers(Start => \&e_entry, ...
http://www.wellho.net/resources/ex.php4?item=p668/exp.pl  [code sample]
#!/usr/bin/perl # XML from Perl - using XML::Parser use XML::Parser; $parser = new XML::Parser(); $parser -> parsefile('apps-admin.xml'); print "done\n";
http://www.wellho.net/resources/ex.php4?item=p668/xml0.pl  [code sample]

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.

This topic is presented on public course Perl for Larger Projects

Examples from our training material
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
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
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
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from http://www.training-notes.co.uk.
Topics covered in this module
What is XML?.
Availability of handling XML from Perl.
Parsing XML from Perl.
Installing the Expat library and XML::Parser.
The principles of a parser.
Styles.
Using subs.
Using Stream.
Event-based handlers.
Other controls possible for the constructor.
An example with a full set of data.
Putting it together.
Use of the XML::Parser::Expat.
Gnome - an alternative to the Expat library.
Using Gnome to edit XML.
Using XSLT from Perl.
Associated files.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses 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. Also available is the Opentalk Forum for discussion of technical questions.


© WELL HOUSE CONSULTANTS LTD., 2009: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho