hasAttribute('namespace')) { throw new Exception('Missing namespace attribute on AdditionalMetadataLocation element.'); } $this->namespace = $xml->getAttribute('namespace'); $this->location = $xml->textContent; } /** * Convert this AdditionalMetadataLocation to XML. * * @param DOMElement $parent The element we should append to. * @return DOMElement This AdditionalMetadataLocation-element. */ public function toXML(DOMElement $parent) { assert('is_string($this->namespace)'); assert('is_string($this->location)'); $e = SAML2_Utils::addString($parent, SAML2_Const::NS_MD, 'md:AdditionalMetadataLocation', $this->location); $e->setAttribute('namespace', $this->namespace); return $e; } }