here's an example of the ticketcity.xml file im using:
<Events Version="3.0" Method="GetEvents" StatusCode="0" StatusMsg="Success">
−
<Event ID="569402" Name="Hair" SeatingChart="http://www.ticketcity.com/images/seatingcharts/MARTINBECK_THEATRE_NYC.GIF" Page="http://www.ticketcity.com/theatre-tickets/broadway-tickets/hair-tickets/hair-tickets-al-hirschfeld-theatre-february-3-200pm.html" EventDateTime="02/03/2010 2:00PM">
<Performer ID="463" Name="Hair" Primary="true"/>
−
<Venue ID="961" Name="Al Hirschfeld Theatre">
<City ID="36469" Name="New York"/>
<State ID="34" Abbr="NY" Name="New York"/>
<Country ID="1" Abbr="US" Name="United States"/>
</Venue>
</Event>
−
</Events>
and the php script to fetch the data:
$ticketcity = new DOMDocument();
$ticketcity->load("ticketcity.xml");
if (empty($ticketcity))
echo "there was some kind of issue fetching the document";
else {
echo "xml loaded, beginning update<br>\n";
$events = $ticketcity->getElementsByTagName("Event");
$i=0;
foreach ($events as $event){
echo $i."<br>\n";
$eventid = $event->getAttribute('ID');
$eventname = $event->getAttribute('Name');
$eventmap = $event->getAttribute('SeatingChart');
$eventpage = $event->getAttribute('Page');
echo "$eventid, $eventname, $eventmap, $eventpage<br>\n";
$i++;
}
I have the $i there just for debugging, so that I'd have some printout at all... The problem is that I don't have anything. I get absolutely no printout from anything except "xml loaded, beginning update
"
The script couldn't be any simpler, and it works fine with another XML file, the only difference between this and the other xml file is that the other file's data is stored in node values, and not attributes... I'm going crazy over this, what am I missing?