(No version information available, might be only in CVS)
DomElement->get_attribute() — 与えられた属性の値を返す
現在の要素中の与えられた属性の値を返します。
PHP 4.3 以降、与えられた名前 name を持つ属性がない場合、空文字列が返されます。
検索する属性の名前。このパラメータは大文字小文字を区別します。
属性の名前を文字列として返す、もしくは与えられた名前 name を持つ属性がない場合、空文字列が返されます。
Example#1 属性の値を取得する
<?phpinclude("example.inc");if (!$dom = domxml_open_mem($xmlstr)) { echo "Error while parsing the document\n"; exit;}// chapter を取得する$root = $dom->document_element();echo $root->get_attribute('language'); // en?>
DOMElement->getAttribute() を使用してください。