title: Delphi Read parameters from struct in XML with IXMLDOMDocument and IXMLDomNode;
body: <p>I had this xml file:</p>
  
  <pre><code>&lt;?xml version='1.0'?&gt;
  &lt;methodResponse&gt;
      &lt;params&gt;
          &lt;param&gt;
              &lt;value&gt;&lt;struct&gt;
                      &lt;member&gt;
                          &lt;name&gt;status&lt;/name&gt;
                          &lt;value&gt;&lt;int&gt;1&lt;/int&gt;&lt;/value&gt;
                      &lt;/member&gt;
                      &lt;member&gt;
                          &lt;name&gt;msg&lt;/name&gt;
                          &lt;value&gt;&lt;string&gt;Operazione completata correttamente&lt;/string&gt;&lt;/value&gt;
                      &lt;/member&gt;
                      &lt;member&gt;
                          &lt;name&gt;valres&lt;/name&gt;
                          &lt;value&gt;&lt;struct&gt;
                                  &lt;member&gt;
                                      &lt;name&gt;coderr&lt;/name&gt;
                                      &lt;value&gt;&lt;int&gt;0&lt;/int&gt;&lt;/value&gt;
                                  &lt;/member&gt;
                                  &lt;member&gt;
                                      &lt;name&gt;deserr&lt;/name&gt;
                                      &lt;value&gt;&lt;string&gt;ricezione di UpdateDevice avvenuta correttamente&lt;/string&gt;&lt;/value&gt;
                                  &lt;/member&gt;
                                  &lt;member&gt;
                                      &lt;name&gt;pairingip&lt;/name&gt;
                                      &lt;value&gt;&lt;string&gt;192.168.1.15&lt;/string&gt;&lt;/value&gt;
                                  &lt;/member&gt;
                                  &lt;member&gt;
                                      &lt;name&gt;pairingdevtype&lt;/name&gt;
                                      &lt;value&gt;&lt;int&gt;3&lt;/int&gt;&lt;/value&gt;
                                  &lt;/member&gt;
                              &lt;/struct&gt;&lt;/value&gt;
                      &lt;/member&gt;
                      &lt;member&gt;
                          &lt;name&gt;svrvers&lt;/name&gt;
                          &lt;value&gt;&lt;string&gt;&lt;/string&gt;&lt;/value&gt;
                      &lt;/member&gt;
                  &lt;/struct&gt;&lt;/value&gt;
          &lt;/param&gt;
      &lt;/params&gt;
  &lt;/methodResponse&gt;
  </code></pre>
  
  <p>but i cannot read pairingip and pairingdevtype if it exists. How can i do it?</p>
  
  <p>I tryed so:</p>
  
  <pre><code>procedure TForm1.ParseResult(ResultString : string);
  var
    xml: IXMLDOMDocument;
    node: IXMLDomNode;
    nodes_row, nodes_se: IXMLDomNodeList;
    i, j: Integer;
    url: string;
  
  begin
    xml := CreateOleObject('Microsoft.XMLDOM') as IXMLDOMDocument;
    xml.async := False;
    xml.loadXML(Resultstring); // or use loadXML to load XML 
    if xml.parseError.errorCode &lt;&gt; 0 then
      raise Exception.Create('XML Load error:' + xml.parseError.reason);
  
    Node := xml.selectSingleNode('//methodResponse/params/param');
    if (Node&lt;&gt;nil) then exit;
  
    nodes_row := xml.selectNodes('//methodResponse/params/param');
    for i := 0 to nodes_row.length - 1 do
    begin
      node := nodes_row.item[i];
      Memo2.Lines.Add('res=' + node.text);
    end;
  end;
  </code></pre>
  
  <p>In this i can obtain all content of param in one line but i can go down to read pairingip and pairingdevtype </p>
  
  <p>please help me</p>