I make a drupal_http_request
to a server which sends me response data as the XML which is considered string in the Drupal server.
How do I parse this string as XML or convert this string into XML and then extract the information I am looking for?
I make a drupal_http_request
to a server which sends me response data as the XML which is considered string in the Drupal server.
How do I parse this string as XML or convert this string into XML and then extract the information I am looking for?
Add the result inside a simpleXmlIterator object.
If the string is really a XML you'll be able to parse it.
As I just saw inside the documentation
You may do something like this
$obj = drupal_http_request($url);
$feed = new SimpleXmlIterator($obj->data);