File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 66
77use DOMElement ;
88use SimpleSAML \XML \Exception \InvalidDOMElementException ;
9+ use SimpleSAML \XMLSecurity \Utils \XPath as XPathUtils ;
910use Webmozart \Assert \Assert ;
1011
1112use function str_replace ;
@@ -108,9 +109,9 @@ public static function fromXML(DOMElement $xml): object
108109 Assert::same ($ xml ->namespaceURI , self ::NS , InvalidDOMElementException::class);
109110
110111 $ namespaces = [];
111- $ xpath = new \ DOMXPath ($ xml ->ownerDocument );
112+ $ xpath = XPathUtils:: getXPath ($ xml ->ownerDocument );
112113 /** @var \DOMNode $ns */
113- foreach ($ xpath -> query ( './namespace::* ' , $ xml ) as $ ns ) {
114+ foreach (XPathUtils:: xpQuery ( $ xml , './namespace::* ' , $ xpath ) as $ ns ) {
114115 if ($ xml ->getAttributeNode ($ ns ->nodeName )) {
115116 // only add namespaces when they are defined explicitly in an attribute
116117 $ namespaces [$ ns ->localName ] = $ xml ->getAttribute ($ ns ->nodeName );
You can’t perform that action at this time.
0 commit comments