Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: DOMAttr->isId() - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net

search for in the

DOMCharacterData->appendData()" width="11" height="7"/> <DOMAttr->__construct()
Last updated: Wed, 01 Nov 2006
view this page in

DOMAttr->isId()

(no version information, might be only in CVS)

DOMAttr->isId() --  属性が定義済みの ID かどうかを調べる

説明

class DOMAttr {

bool isId ( void )

}

この関数は、属性が定義済みの ID かどうかを調べます。

DOM 標準規格によると、DTD では ID 型の属性 ID が定義されていなければ なりません。この関数を使用する前には、 DOMDocument->validate() あるいは DOMDocument::validateOnParse を使用して ドキュメントを検証する必要があります。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

例 1. DOMAttr->isId() の例

<?php

$doc
= new DomDocument;

// id を参照する前に、ドキュメントを検証しなければなりません。
$doc->validateOnParse = true;
$doc->Load('book.xml');

// chapter 要素から、id という名前の属性を取得します。
$attr = $doc->getElementsByTagName('chapter')->item(0)->getAttributeNode('id');

var_dump($attr->isId()); // bool(true)

?>



add a note add a note User Contributed Notes
DOMAttr->isId()
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites