Your IP : 216.73.216.74


Current Path : /proc/thread-self/root/usr/share/doc/perl-XML-Writer/examples/
Upload File :
Current File : //proc/thread-self/root/usr/share/doc/perl-XML-Writer/examples/double-escaping-example.pl

#!/usr/bin/perl -w

# Demonstrate that ampersands are double-escaped

# Even if your text looks like already-escaped XML, it will be escaped
#  again to make sure that the same text arrives at the other end.

use strict;

use XML::Writer;

my $w = XML::Writer->new();

$w->startTag('doc');
$w->characters('In HTML and XML, an ampersand must be escaped as &');
$w->endTag('doc');
$w->end();