35 if (!
$xml->hasAttribute(
'Algorithm')) {
36 throw new \Exception(
'Missing required attribute "Algorithm" in alg:DigestMethod element.');
38 $this->Algorithm =
$xml->getAttribute(
'Algorithm');
50 assert(is_string($this->Algorithm));
52 $doc = $parent->ownerDocument;
53 $e = $doc->createElementNS(
Common::NS,
'alg:DigestMethod');
54 $parent->appendChild($e);
55 $e->setAttribute(
'Algorithm', $this->Algorithm);
toXML(\DOMElement $parent)
Convert this element to XML.
__construct(\DOMElement $xml=null)
Create/parse an alg:DigestMethod element.