Parsing XML from RSS Page
I've just setup an RSS page on a website I'm working on and I'd like to know how to successfully parse the XML on this feed, so I can spit out the same content on a different page.
I'll run through what I'm trying to do. I've set up an RSS page which basically feeds its content from a programme.php which is basically a page with a big list of events, times and dates etc.
The RSS page seems to be successfully grabbing out the content from programme.php in a sort of XML format. I say sort of because it isn't exactly a pure XML document that I'm accustomed to working with i.e.
<?xml version="1.0" encoding="UTF-8"?> <item> <example>Test</example> </item>
Instead I'm getting page which includes it's own html and body tag, see picture below :
I'm not really sure how to workaround this, but basically my next plan of action was to use simpleXML to retrieve the data here and spit out the parts of the XML that I need i.e. I specifically need the contents sitting inside the <item> nodes....however it seems because of the pages structure or it not being a true XML document, simpleXML is just not working on this page.
Not sure how well I've explained myself, but would appreciate any assistance here.
Want to reply to this thread?Login with Perch