Sample code for 30+ languages & platforms
Perl

Setting XML Tag and Content

See more XML Examples

Demonstrates how to set the tag and content of an XML node.

The following XML sample code produces this output:


<abc>123</abc>

Chilkat Perl Downloads

Chilkat2 Perl
use strict;
use warnings;
use Chilkat2;

my $xml = Chilkat2::Xml->new;

$xml->Tag('abc');
$xml->Content('123');

print $xml->GetXml(), "\n";