0

I have an msxml document that I'm trying to parse.

This is the xml -

xmlDoc.responseDocument:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <Response xmlns="http://company.com/Services">
            <Result>test</Result>
        </Response>
    </soap:Body>
</soap:Envelope>

xmlDoc.selectSingleNode("soap:Body") returns "Reference to undeclared namespace prefix: 'soap'."

Thanks for any help provided.

Bookamp
  • 672
  • 8
  • 19

1 Answers1

1

For anyone interested, this worked for me -

var soapNS = 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"';
xmlDoc.documentElement.setProperty("SelectionNamespaces", soapNS);
xmlDoc.document.selectSingleNode("soap:Body");
Bookamp
  • 672
  • 8
  • 19