CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
XML and Perl

 



Srivathsan Kris
Deleted

Nov 21, 2000, 10:11 AM

Post #1 of 2 (382 views)
XML and Perl Can't Post

Hi All
How do i append a child element to the following code ?

use XML::DOM;

my $doc = new XML::DOM::Document;
my $root = $doc->createElement ("PersonalInfo");
print $doc->toString;


Thanks in Advance


Srivathsan


Srivathsan Kris
Deleted

Nov 21, 2000, 6:05 AM

Post #2 of 2 (382 views)
Re: XML and Perl [In reply to] Can't Post

Hello Folks


I got the answer .Probably u guys can use this !


use XML::DOM;
use XML::Element;

my $doc=new XML::DOM::Document;
my $root=$doc->createElement("PersonalInfo");

my $child1=$doc->createElement("Name");
$root->appendChild($child1);

print $root->toString;

Bye

Srivathsan

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives