title: How to parse xml/sbml with R package xml?
body: <p>I'm trying to parse information from the sbml/xml file below</p>
  
  <p><a href="https://dl.dropboxusercontent.com/u/10712588/file.xml" rel="nofollow">https://dl.dropboxusercontent.com/u/10712588/file.xml</a></p>
  
  <p>from this code</p>
  
  <p><a href="http://search.bioconductor.jp/codes/11172" rel="nofollow">http://search.bioconductor.jp/codes/11172</a></p>
  
  <p>It seems that I can import the file normally by</p>
  
  <pre><code>doc &lt;- xmlTreeParse(filename,ignoreBlanks = TRUE) 
  </code></pre>
  
  <p>but I can't recover node attributes by</p>
  
  <pre><code>atrr &lt;- xpathApply(doc, "//species[@id]", xmlGetAttr, "id")
  </code></pre>
  
  <p>or</p>
  
  <pre><code>xpathApply(doc, "//species", function(n) xmlValue(n[[2]]))
  </code></pre>
  
  <p>A node of the file follows...</p>
  
  <pre><code>&lt;species id="M_10fthf_m" initialConcentration="1" constant="false" hasOnly
  SubstanceUnits="false" name="10-formyltetrahydrofolate(2-)" metaid="_metaM_10fth
  f_m" boundaryCondition="false" sboTerm="SBO:0000247" compartment="m"&gt;
          &lt;notes&gt;
            &lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
              &lt;p&gt;FORMULA: C20H21N7O7&lt;/p&gt;
              &lt;p&gt;CHARGE: -2&lt;/p&gt;
              &lt;p&gt;INCHI: InChI=1S/C20H23N7O7/c21-20-25-16-15(18(32)26-20)23-11(7-22
  -16)8-27(9-28)12-3-1-10(2-4-12)17(31)24-13(19(33)34)5-6-14(29)30/h1-4,9,11,13,23
  H,5-8H2,(H,24,31)(H,29,30)(H,33,34)(H4,21,22,25,26,32)/p-2/t11-,13+/m1/s1&lt;/p&gt;
              &lt;p&gt;HEPATONET_1.0_ABBREVIATION: HC00212&lt;/p&gt;
              &lt;p&gt;EHMN_ABBREVIATION: C00234&lt;/p&gt;
            &lt;/body&gt;
          &lt;/notes&gt;
          &lt;annotation&gt;
  ...
  </code></pre>
  
  <p>I would like to retrieve all information inside species node, anyone know how to do that?</p>