XML and Perl: Embedding XML in HTML | 4
XML and Perl::Resources
If XML is the technology that gives Java something to do, then Perl is the language that will make XML do something useful. After all, it's the language that makes hard things easy, and the impossible, possible. It's also the best text processing language I've ever worked with.
The development of XML modules for Perl has been progressing nicely over the past year. There are now several useful modules available at the Comprehensive Perl Archive Network. A good information reference on Perl in general can be found at https://www.perl.com. A Perl-XML mailing list is also available. To join, send an email to [email protected] with the message: SUBSCRIBE Perl-XML.
Because XML requires strict adherence to its specification, we will not be using any of the XML modules for Perl in this article. We can, however, use Perl regular expressions to extract information from the tags.
XML Resources
- XML modules on CPAN - https://www.perl.com/CPAN/modules/by-category/15_World_Wide_Web_HTML_HTTP_CGI/XML
- XML section at perl.com - https://reference.perl.com/query.cgi?xml
- Perl XML FAQ - https://www.perlxml.com/faq/perl-xml-faq.html
Requirements
You will need the following Perl modules for the Perl code in this article (available at CPAN):- LWP
- CGI
- Save the Perl script to an executable directory on your Web server
- If the Web server runs on a *nix variant, make sure the script is readable and executable, i.e. chmod 755 xml-fetch.pl
- Modify the first line of the script so that the path points to the location of Perl on your system (*nix only), i.e. #!/usr/bin/perl
Produced by Jonathan
Eisenzopf and
Created: Feb. 14, 1999
Revised: Feb. 17, 1999
URL: https://www.webreference.com/perl/tutorial1/