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

 

 

 

 

 

 

 

Format XML with Indentation

Demonstrates how to format XML with indenting.

Download Chilkat Perl Module

use chilkat;

$xml = new chilkat::CkXml();

# The Chilkat XML component is freeware.

$xml->LoadXml("<root><company><name>Chilkat Software, Inc.</name><url>http://www.chilkatsoft.com/</url><phone>630-784-9670</phone></company></root>");

# GetXml always returns the XML indented for
# visual inspection.
print $xml->getXml() . "\r\n";

# Output looks like this:
# 
# <?xml version="1.0" encoding="utf-8" ?>
# 
# <root>
# <company>
# <name>Chilkat Software, Inc.</name>
# <url>http://www.chilkatsoft.com/</url>
# <phone>630-784-9670</phone>
# </company>
# </root>

 

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

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