Results 1 to 3 of 3

Thread: [RESOLVED] PHP & XML File (RSS)

  1. #1
    Join Date
    Sep 2008

    resolved [RESOLVED] PHP & XML File (RSS)

    Hello again...

    I posted something earlier today that I'm close to resolving myself. At this point in time I only have one issue with my code (after I found multiple errors earlier).

    I'm extracting information from a WordPress XML File. I'm trying to pull an image location but although it's in the XML file, it's not being recognized as a XML file "tag" because it doesn't have a closing tag.

    XML Example:

    		<title>VH1′s Behind The Music: Usher</title>
    		<pubDate>Tue, 20 Jul 2010 14:28:02 +0000</pubDate>
    				<category><![CDATA[ATL Music]]></category>
    		<category><![CDATA[atl music]]></category>
    		<category><![CDATA[behind the music]]></category>
    		<guid isPermaLink="false">http://www.volumestat.com/?p=5826</guid>
    Usher’s “Behind The Music” aired last night on VH1, where he gets personal about his relationships, marriage, what it’s like being a father, the concepts behind his albums and his brief reunion with his dad. The episode takes you from how he got discovered at talent shows, to recording his debut with Diddy, the liberation [...]]]></description>
    	<enclosure url='http://www.volumestat.com/wp-content/uploads/2010/07/usherraymond-600x344-150x150.jpg' length ='6481'  type='image/jpg' />	
    This is it in red. How can I access the "url" in this tag in an XML file, although it isn't being recognized as an actual XML tag??

    Meaning that I can't use
    PHP Code:
    foreach ($item -> enclosure as $img_tag

  2. #2
    Join Date
    Jan 2009

  3. #3
    Join Date
    Sep 2008
    appreciate that very much..I'm working on your suggestion now.. thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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