| Server IP : 217.160.0.244 / Your IP : 216.73.217.138 Web Server : Apache System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64 User : u100174116 ( 6746176) PHP Version : 8.5.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/doc/libxml-writer-perl/examples/ |
Upload File : |
#!/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();