require_once "XML/RDDL.php";
// create new parser
$rddl = &new XML_RDDL();
// parse a document that contains RDDL resources
$result = $rddl->parseRDDL('http://www.rddl.org');
// check for error
if (PEAR::isError($result)) {
echo sprintf( "ERROR: %s (code %d)", $result->getMessage(), $result->getCode());
exit;
}
// get all english resources
$en = $rddl->getResourcesByLanguage('en');
echo "<pre>";
print_r($en);
echo "</pre>"; |