help on catching xml response

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
i really dont know how to ask it right, but i have this code:
$xml= '<xml ..

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ' ');
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $xml);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec ($ch);

// display the result
curl_close ($ch);

this code is working well. upon running the code it will give an xml
reply, however on the page it looks somethng like this:

string(426) " xxxx.... .. Email already exist, 1 "

on the page if your going to right click and view source, you will see
a well structured xml:

string(426) "<?xml version="1.0" encoding="UTF-8"?>

my issue is how to get the value of one of the element from this xml?
next, i want the response not to be displayed right away on the page
as raw string..i need to trap it and display that on a more fine
manner. how to do this? any help would be highly appreciated.

Re: help on catching xml response

just wanted to add...

what i wanted to do next is get the value between a certain element on
that response xml and assign it to my php variable $mypin.


Site Timeline