How can i get the values of id2 using vba excel? : <?xml version="1.0" encoding="utf-16"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <id xmlns="id.services/">
      <ids1>
        <response xmlns="">`enter code here`
          <ids xmlns="ids">
            <Id-info id0="123" id1="0"  id2="2345" xmlns=""></Id-info>
            <Id-info id0="456" id1="1"  id2="6789" xmlns=""></Id-info>
          </ids>
        </response>
      </ids1>
    </id>
  </s:Body>
</s:Envelope>


I tried:--

Dim xmlDoc As DOMDocument30
Set xmlDoc = New DOMDocument30
xmlDoc.Load ("C:test.xml")

Dim id As String
id = xmlDoc.SelectSingleNode("//ids/Id-info").Attributes.getNamedItem("id2").Text