• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 571
  • Last Modified:

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");

1 Solution
Please try the following:
my $xmlstr
$xmlstr = $response->toString($format,$docencoding);

(See below for daetisl on the arguments to the function).

This function is defined in XML::LibXML::Node .

Useful Ref: http://perl.enstimac.fr/perl5.6.1/site_perl/5.6.1/sun4-solaris/XML/LibXML/Node.html
rgbcofAuthor Commented:
It was an element, so I had to use ->textContent()
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now