AttributeSingleXmlStructure : nom attribut insensible à la casse

2.x 2.5.1
Julien Rosset 2 weeks ago
parent 2dd3b9137a
commit 6d6bfe611b

@ -26,6 +26,13 @@ class AttributeSingleXmlStructure implements IXmlStructure {
* @inheritDoc * @inheritDoc
*/ */
public function parseXml (SimpleXMLElement $xmlNode): string { public function parseXml (SimpleXMLElement $xmlNode): string {
return (string)$xmlNode[$this->attributeName]; if (($attributes = $xmlNode->attributes()) !== null) {
foreach ($attributes as $attributeName => $attributeValue) {
if (mb_strtolower($attributeName) === mb_strtolower($this->attributeName)) {
return (string)$attributeValue;
}
}
}
return '';
} }
} }
Loading…
Cancel
Save