fetch(); // optimisation to send as little data as possible to the browser // Parameter is the dependancies of this page - currently only the xml // file, but if there are others then add to the array cacheHeaders(array($xmlfile)); // parse XML data into arrays for easier processing if (!$httpCache->isError()) { $parser = new simpleParser(); $xml = &$parser->parseString($httpCache->getXml()); } // output page heading ?> SCWLA Division example using PHP

Back to REST Services page

isError()) { echo '

Error retrieving data : ' . $httpCache->getError() . "

\n"; } elseif (!$xml) { echo '

Error converting data : ' . $parser->getError() . "

\n"; } else { // print heading for the division, and table heading for the league table for this division echo '

' . $xml->division->{'division-name'}->cdata . '

'; ?> division->team as $team) { $played = $team->won + $team->drawn + $team->lost; $diff = $team->for - $team->against; ?>
Played Won Drawn Lost For Against Goal Diff. Points
{'team-name'}; ?> won; ?> drawn; ?> lost; ?> for; ?> against; ?> points; ?>

Data provided by southlacrosse.org.uk