SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist
    Join Date
    Jul 2004
    Location
    USA
    Posts
    594
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RSS Feed Parsing Namespace

    Hello,

    I am having trouble figuring out how to get the data out of a namespace from an RSS feed im trying to parse.

    Code:
    <pubDate>Sun, 01 Nov 2009 17:10:18 PST</pubDate> 
    <rx:CurrentPrice xmlns:rx="urn:ebay:apis:eBLBaseComponents">4999</rx:CurrentPrice> 
    <rx:EndTime xmlns:rx="urn:ebay:apis:eBLBaseComponents">1257729018000</rx:EndTime>
    I can retrieve the pubDate fine with no problem, but how can I get the CurrentPrice and EndTime values?

    Help would be appreciated,

    Thanks.
    BKerr

  2. #2
    @php.net Salathe's Avatar
    Join Date
    Dec 2004
    Location
    Edinburgh
    Posts
    1,396
    Mentioned
    54 Post(s)
    Tagged
    0 Thread(s)
    How are you parsing the feed? If using SimpleXML, look into SimpleXMLElement::children; for DOM, DOMElement::getElementsBYTagNameNS.

    If you're using neither, let us know what you are doing.
    Salathe
    Software Developer and PHP Manual Author.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •