XML_RDDL::getResourcesByLanguage() -- selects all resources of a specified language
Описание
Gets all resources of a given language from an RDDL document. You have to call
XML_RDDL::parseRDDL()
first. If a resource has no xml:lang attribute, the xml:lang attribute of the
root of the document is used.
Возвращаемое значение
array array containing all resources with the specified language.
Заметка
Эта функция не должна вызываться статически.
Usage example
Пример 63-1. Getting all english resource 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>"; |
|
HIVE: All information for read only. Please respect copyright! |
|