in reply to Re^3: How to fetch the value using LWP:: UserAgent
in thread How to fetch the value using LWP:: UserAgent

I am Done but using Simple module

if ($response->is_success) { my $data = $response->decoded_content; open (MYFILE, '>>data.xml'); print MYFILE "$data"; close MYFILE; my $xml = new XML::Simple; my $data1 = $xml->XMLin("data.xml"); print $data1->{connectionid}; }

Replies are listed 'Best First'.
Re^5: How to fetch the value using LWP:: UserAgent
by aitap (Curate) on Jul 16, 2012 at 13:09 UTC

    As is's said in the module documentation, you can pass the XML directly to XMLin:

    A string of XML A string containing XML (recognised by the presence of '<' and '>' characters) will be parsed directly. eg: $ref = XMLin('<opt username="bob" password="flurp" />');
    my $data = $xml->XMLin($response->decoded_content);

    Using temporary files should be avoided because it's possible race condition.
    Sorry if my advice was wrong.

      Thanks guys...I am done with both the ways I mean using Simple and LibXML