how to parse an XML Feed in PHP 4.4 using curl without domxml_open_file()?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul

    #1

    how to parse an XML Feed in PHP 4.4 using curl without domxml_open_file()?

    alllow_url_fope n if set to off. For some reason I can not access
    domxml_open_fil e(). And I need to read an xml feed.

    I can access the feed using cURL:

    $feed = curl_init("http ://feddsitegoesher e");
    curl_setopt($fe ed, CURLOPT_RETURNT RANSFER, 1);
    $p= curl_exec($feed );
    curl_close();

    However, I am stuck here because I can't find anything to parse it since I
    can not use domxml_open_fil e().

    Any ideas? Thanks!


  • petersprc

    #2
    Re: how to parse an XML Feed in PHP 4.4 using curl without domxml_open_fil e()?

    Hi,

    You can use a pure PHP XML parser like DOMIT!
    (http://freshmeat.net/projects/domit/).

    Or if you have access to the XML extension (php.net/xml) you can use
    that.

    Paul wrote:
    alllow_url_fope n if set to off. For some reason I can not access
    domxml_open_fil e(). And I need to read an xml feed.
    >
    I can access the feed using cURL:
    >
    $feed = curl_init("http ://feddsitegoesher e");
    curl_setopt($fe ed, CURLOPT_RETURNT RANSFER, 1);
    $p= curl_exec($feed );
    curl_close();
    >
    However, I am stuck here because I can't find anything to parse it since I
    can not use domxml_open_fil e().
    >
    Any ideas? Thanks!

    Comment

    Working...