I have properly parsed one XML feed, and have inputted that data into a table on my site. However, I am dealing with a slightly more complicated feed, and am having trouble finding tree nodes.
XML Feed: http://xml.pinnaclesports.com/pinnaclefeed.aspx?sporttype=Football&sportsubtype=NFL
Declare variables:
$AwayLine = (string)$xml2->spread_visiting;
$HomeLine = (string)$xml2->home_visiting;
From my understanding, the feed is broken down as(obviously, im wrong):
foreach ($xml2->event->period[0]->spread as $Spread) {
$AwayLine = $Spread->spread_visiting;
$HomeLine = $Spread->spread_home;
}
Based on the XML path, every item is seen as an event. Every event has multiple periods. Every period has a spread. Every spread includes spread_visiting and spread_home. However, I only need the spreads in the first period, or period[0]
Any help would be greatly appreciated!