XML_Statistics::countAttribute

XML_Statistics::countAttribute() – 属性 (attribute) の出現数をカウントする

Synopsis

require_once 'XML/Statistics.php';

integer XML_Statistics::countAttribute ( string $attribute = null , string $tagname = null )

Description

ドキュメントの中である属性がどれだけ用いられたかをカウントします。 属性が指定されなかった場合は全体のタグの数をカウントします。

2番目の引数で特定のタグのみを検索するように制限します。

Parameter

  • string $attribute - もし属性の名前を取らなければ、すべての要素がカウントされます。

  • string $tagname - 特定のタグに検索を制限します。

Return value

integer 属性の出現数、あるいは属性が見つからなかった場合に PEAR_Error を返します。

Note

This function can not be called statically.