how to get namespace prefixes from XML document, using MSXML ?
- by KaluSingh Gabbar
For example,
In this document
< ?xml version="1.0" ? >
< SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="http://opcfoundation.org/webservices/XMLDA/1.0/"
xmlns:ns2="Service">
< SOAP-ENV:Body id="_0" >
if I need to select the element "Body", I need to know the prefix "SOAP-ENV". How can I get that? getting a root element and slicing the colon (:) off seems a dirty idea to me, I am sure there should be a neat way to do that. Google does not help (may be I am not searching for the right thing).