Ok, it is not working again, this is in the same routine, the first one works, but now this one does not work... Here is the code:
$_xmlCode = q~<?xml version="1.0" encoding="UTF-8"?><PayoneerToken><To +ken>https://sandbox.payoneer.com/partners/lp.aspx?token=akn2w3knsnk32 +3lnknasdin4falkngnaskjncik32l12</Token></PayoneerToken> ~; $ob = new XML::Bare( text => "$_xmlCode" ); $root = $ob->parse(); $_redirectUrl = $root->{PayoneerToken}{Token}{Value}; # Print to browser to see if it is working... print "Content-type: text/html\n\n"; print qq~ \$_redirectUrl = '$_redirectUrl';<br> <br> <b>\$_xmlCode='$_xmlCode'</b>;<br>~;
And it does not work, it prints this in the browser:
## Browser output not perl code: $_redirectUrl = ''; $_xmlCode='<?xml version="1.0" encoding="UTF-8"?><PayoneerToken><Token +>https://sandbox.payoneer.com/partners/lp.aspx?token=akn2w3knsnk323ln +knasdin4falkngnaskjncik32l12</Token></PayoneerToken>';
Any idea now, why that would not work? I've tried changing the variables names and everything.

I installed XML::Trivial as pajout suggested in his thread. I used the cpan module to install it with all the dependencies but I had to force it to get it to install, and it returned make success, however, when just calling the use on it, I get errors on the server, so I am not going to even try using that one.

I would really appreciate any advice on what you think the problem could be now.

Thank you again.
Richard

In reply to Re: parsing various xml responses by Anonymous Monk
in thread parsing various xml responses by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.