Go Back   SitePoint Forums > Forum Index > Program Your Site > PHP
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Nov 8, 2009, 16:41   #1
BKerr
SitePoint Evangelist
 
Join Date: Jul 2004
Location: USA
Posts: 572
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 is offline   Reply With Quote
Old Nov 8, 2009, 17:31   #2
Salathe
/(?i:\Abb\z)|(?![Bb]{2})/
 
Salathe's Avatar
 
Join Date: Dec 2004
Location: Wigan, United Kingdom
Posts: 617
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 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 03:25.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved