Validating xml with perl internet dating cheshire
REX, written by Rob Cameron, is a fairly complete shallow parser written in Perl. However, Earl Hood has written perl SGML, which is a collection of Perl scripts and libraries for parsing and manipulating SGML. You can find the SP toolkit which includes NSGMLS at
XML:: Parser is available in Active State's package repository.
The distribution includes Expat, so you don't have to worry about installing it separately. Clark Cooper has also written a nice intro to XML:: Parser which is available at
In some cases, you may want to utilize regular expressions to manipulate XML. If you require UTF8 encoding support, you will need version 5.005_52 or greater. To get the latest Perl distribution, visit and select the closest CPAN mirror site. XML:: Parser is built on-top-of Expat, a non-validating parser, so a DOCTYPE declaration will be checked for syntax but will not be used to validate the XML. You may also try the SGMLspm module from David Megginson, available on CPAN at which is a library for parsing the output from James Clark's NSGMLS parser.
Information in this FAQ is primarily based on discussions and information transmitted to the Perl XML email list.
To join, send an email to [email protected] with the message: SUBSCRIBE Perl-XML. To generate the Perl XML FAQ, run perl which prints the HTML to STDOUT.
This FAQ contains information related to using and manipulating XML with Perl.
Please direct all corrections and additions to [email protected] Asakura Hiroshi has created a Japanese translation of this FAQ which is available at
This FAQ was generated using a small Perl script and an XML file. The e Xtensible Markup Language, or XML, is a simplified version of SGML developed by the World Wide Web Consortium.
Unlike the limited tag-set offered by HTML, XML allows authors to define tags based upon the logical structure of their documents. Additional information about XML is available from the World Wide Web Consortium at
The module is a Perl wrapper around Expat, a non-validating parser written in C by James Clark.
The module can be found on any CPAN server or on Clark's home page at