Link to home
Start Free TrialLog in
Avatar of rgbcof
rgbcof

asked on

perl, how to print xml element

How to print $response?
perl code:
    my $response = XML::LibXML::Element->new("response");

    my $message_response = XML::LibXML::Element->new("element1");
    $message_response->appendChild(XML::LibXML::Element->new("tag1"));
    $message_response->appendChild(XML::LibXML::Element->new("tag2"));
    $response->appendChild($message_response);


ASKER CERTIFIED SOLUTION
Avatar of SANTABABY
SANTABABY
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgbcof
rgbcof

ASKER

It was an element, so I had to use ->textContent()