title: Get attribute value from XML
body: <p>Anyone can help me how can I get attribute values from the xml? </p>
  
  <p>My XML looks like...</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="iso-8859-2"?&gt;
  &lt;root&gt;
   &lt;class classtype="TSampleClass" reference_id="1"&gt;
   &lt;class name="FList" classtype="TList&amp;lt;class.TKtgSampleClass;" reference_id="2"&gt;
    &lt;dynarray name="FItems" count="2" reference_id="3"&gt;
      &lt;class index="0" classtype="TRecord" reference_id="4"&gt;
        &lt;member name="FID" type="Integer"&gt;1&lt;/member&gt;
        &lt;member name="FName" type="string"&gt;Name1&lt;/member&gt;
        &lt;member name="FComment" type="string"&gt;comment1&lt;/member&gt;
      &lt;/class&gt;
      &lt;class index="1" classtype="TRecord" reference_id="5"&gt;
        &lt;member name="FID" type="Integer"&gt;0&lt;/member&gt;
        &lt;member name="FName" type="string"&gt;Name2&lt;/member&gt;
        &lt;member name="FComment" type="string"&gt;comment2&lt;/member&gt;
      &lt;/class&gt;
    &lt;/dynarray&gt;
    &lt;member name="FCount" type="Integer"&gt;2&lt;/member&gt;
    &lt;class name="FArrayManager" classtype="TMoveArrayManager&amp;lt;class.TKtgSampleClass;" reference_id="6"/&gt;
   &lt;/class&gt;
   &lt;member name="FNextID" type="Integer"&gt;2&lt;/member&gt;
   &lt;/class&gt;
   &lt;/root&gt;
  </code></pre>
  
  <p>I tried with this:</p>
  
  <pre><code>procedure GetValues;
  var
    C: Integer;
    vXMLDOC: IXMLDOMDocument;
    vNodes : IXMLDOMNodeList;
    vNode : IXMLDOMNode;
    s: string;
  begin
    vXMLDOC := CoDOMDocument.Create;
    vXMLDOC.load(c_FileName);
  
    vNodes := vXMLDOC.selectNodes('//dynarray/class');
  
  for C := 0 to vNodes.length -1 do
  begin
    showmessage(vNodes.item[C].text);
  //    s := vNodes.item[C].attributes.getNamedItem('FName').text;
   end;
  end;
  </code></pre>
  
  <p>vNodes.item[C].text gives all the values, but I need the values one by one (FID, FName...)</p>
  
  <p>Thanks!</p>