Perl Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



Perl Examples

Quick Start
Perl Unicode
Perl Byte Array
Perl Certs
Perl Email
Perl Encryption
Perl FTP
HTML-to-XML
Perl HTTP
Perl IMAP
Perl MHT
Perl MIME
Perl RSA
Perl S/MIME
Perl Signatures
Perl Socket
Perl Spider
Perl Tar
Perl Upload
Perl XML
Perl XMP
Perl Zip

More Examples...
String
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

 

Convert HTML to well-formed XML

The Chilkat Perl HTML-to-XML conversion component will convert any HTML to well-formed XML. After converting, existing XML parsers, tools, and libraries can be leveraged to extract (scrape) information.

The input/output files used in this example are provided here, along details explaining rules for conversion.

Download Perl Programming Example Scripts

# file: htmlToXml.pl

use chilkat;

# Perl script to convert HTML files to well-formed XML

$htmlConv = new chilkat::CkHtmlToXml();
$success = $htmlConv->UnlockComponent("anything for 30-day trial");
if (! $success) {
	print "component is locked!\n";
	exit;
}

$htmlConv->ConvertFile("exampleData/test1.html","output/test1.xml");
$htmlConv->ConvertFile("exampleData/test2.html","output/test2.xml");
$htmlConv->ConvertFile("exampleData/test3.html","output/test3.xml");



 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2007 Chilkat Software, Inc. All Rights Reserved.