XML_Statistics::countAttribute

XML_Statistics::countAttribute() – compte les occurences d'un attribut

Synopsis

require_once 'XML/Statistics.php';

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

Description

Compte le nombre d'utilisation d'un certain attribut dans un document.. Si aucun attribut n'est spécifié, le total du nombre de tags sera donné.

Avec le second paramètre, vous pouvez limiter la recherche à un tag spécifique.

Parameter

  • string $attribute - si aucun nom de tag n'est spécifié, tous les tags seront comptés.

  • string $tagname - ceci vous permet de limiter la recherche à un tag.

Return value

integer : nombre d'occurences de l'attribut ou PEAR_Error si l'attribut n'a pû être trouvé.

Note

This function can not be called statically.