protected static function PHPUnit_Util_XML::getElementsByCaseInsensitiveTagName in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Util/XML.php \PHPUnit_Util_XML::getElementsByCaseInsensitiveTagName()
Gets elements by case insensitive tagname.
@since Method available since Release 3.4.0
Parameters
DOMDocument $dom:
string $tag:
Return value
DOMNodeList
1 call to PHPUnit_Util_XML::getElementsByCaseInsensitiveTagName()
- PHPUnit_Util_XML::findNodes in vendor/
phpunit/ phpunit/ src/ Util/ XML.php - Parse out the options from the tag using DOM object tree.
File
- vendor/
phpunit/ phpunit/ src/ Util/ XML.php, line 869
Class
- PHPUnit_Util_XML
- XML helpers.
Code
protected static function getElementsByCaseInsensitiveTagName(DOMDocument $dom, $tag) {
$elements = $dom
->getElementsByTagName(strtolower($tag));
if ($elements->length == 0) {
$elements = $dom
->getElementsByTagName(strtoupper($tag));
}
return $elements;
}