AttributeSingleXmlStructure : nom attribut insensible à la casse

master 3.0.2
Julien Rosset 2 weeks ago
parent 72d3e0ed4d
commit 967e0358f5

@ -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