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


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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I haven't used XML::XPath much but it looks like the below will work:
print $notificationXML->findnodes_as_string('/');
# at least I think / will find all nodes

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BbouchAuthor Commented:
Wow.  That was too easy. Thanks for the extra set of eyes :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.