Link to home
Start Free TrialLog in
Avatar of Bbouch
BbouchFlag for United States of America

asked on

How can I get a string representation of an XML::XPath object?

I have a script that is using the XML::XPath module from CPAN to manipulate an XML document by pulling in a template and setting some node text values.  The code is similar to the following:

my $notificationXML = XML::XPath->new(xml => $notificationRqst );   #where $notificationRqst is a string of XML

$notificationXML->setNodeText('/notificationRequestDtl/notificationRequestDtlHdr/priority','HIGH');


So, at this point, I have (I think) my original XML with one node value changed.  Now I want to pass the $notificationXML object to another command, which accepts a variable containing a string of XML (same as the $notificationRqst variable $notificationXML was created from.

Not sure if my question is making sense, since I'm not sure how to ask it. If you need clarification please ask.
ASKER CERTIFIED SOLUTION
Avatar of wilcoxon
wilcoxon
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 Bbouch

ASKER

Wow.  That was too easy. Thanks for the extra set of eyes :)