diff --git a/src/Attribute.php b/src/Attribute.php index 53dad7c..84f13c0 100644 --- a/src/Attribute.php +++ b/src/Attribute.php @@ -108,7 +108,7 @@ public function toXML(DOMElement $parent): DOMElement { $parent->setAttributeNS( $this->getNamespaceURI(), - ($this->getNamespacePrefix() !== null) + ($this->getNamespacePrefix() !== '') ? ($this->getNamespacePrefix() . ':' . $this->getAttrName()) : $this->getAttrName(), $this->getAttrValue(),