title: How to get values of child nodes with QDomDocument?
body: <p>A recieve a string like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;invoke name="CanClose" returntype="xml"&gt;
     &lt;arguments&gt;
         &lt;string&gt;# 998.40&lt;/string&gt;
         &lt;number&gt;49920&lt;/number&gt;
     &lt;/arguments&gt;
  &lt;/invoke&gt;
  </code></pre>
  
  <p>I'd like to use <code>QDomDocument</code> to get the values of arguments' child nodes by their index (I would like to extract the strings "# 998.40" and "49920" in the example).</p>
  
  <p>This is what I tried:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>QString argument(int index)
  {
      QDomNode arg = xml-&gt;elementsByTagName("arguments").at(index);
      return arg.nodeValue();
  }
  </code></pre>
  
  <p>But even <code>arg</code> was empty. What am I doing wrong here? </p>
  
  <p>Thanks in advance.</p>