title: xml_find_all function from xml2 package (R) does not find relevant nodes
body: <p>I am using the xml2 package in R to access xml data, and found that it behaves different on different xml_documents.</p>
  
  <p>On this pet example</p>
  
  <pre><code>library(xml2)
  doc &lt;- read_xml( "&lt;MEMBERS&gt;
                        &lt;CUSTOMER&gt;
                           &lt;ID&gt;178&lt;/ID&gt;
                           &lt;FIRST.NAME&gt;Alvaro&lt;/FIRST.NAME&gt;
                           &lt;LAST.NAME&gt;Juarez&lt;/LAST.NAME&gt;
                           &lt;ADDRESS&gt;123 Park Ave&lt;/ADDRESS&gt;
                           &lt;ZIP&gt;57701&lt;/ZIP&gt;
                        &lt;/CUSTOMER&gt;
                        &lt;CUSTOMER&gt;
                           &lt;ID&gt;934&lt;/ID&gt;
                           &lt;FIRST.NAME&gt;Janette&lt;/FIRST.NAME&gt;
                           &lt;LAST.NAME&gt;Johnson&lt;/LAST.NAME&gt;
                           &lt;ADDRESS&gt;456 Candy Ln&lt;/ADDRESS&gt;
                           &lt;ZIP&gt;57701&lt;/ZIP&gt;
                        &lt;/CUSTOMER&gt;  
                     &lt;/MEMBERS&gt;")
  doc
  {xml_document}
  &lt;MEMBERS&gt;
  [1] &lt;CUSTOMER&gt;\n  &lt;ID&gt;178&lt;/ID&gt;\n  &lt;FIRST.NAME&gt;Alvaro&lt;/FIRST.NAME&gt;\n  &lt;LAST.NAME&gt;Juarez&lt;/LAST.NAME&gt;\n  &lt;ADDRESS&gt;12 ...
  [2] &lt;CUSTOMER&gt;\n  &lt;ID&gt;934&lt;/ID&gt;\n  &lt;FIRST.NAME&gt;Janette&lt;/FIRST.NAME&gt;\n  &lt;LAST.NAME&gt;Johnson&lt;/LAST.NAME&gt;\n  &lt;ADDRESS&gt; ...
  </code></pre>
  
  <p>I can run the following code</p>
  
  <pre><code>xml_find_all(doc, "//FIRST.NAME")
  {xml_nodeset (2)}
  [1] &lt;FIRST.NAME&gt;Alvaro&lt;/FIRST.NAME&gt;
  [2] &lt;FIRST.NAME&gt;Janette&lt;/FIRST.NAME&gt;
  </code></pre>
  
  <p>giving me the expected output (finding all nodes with 'FIRST.NAME' tags).</p>
  
  <p>However, if I perform the same action on <a href="https://www.dropbox.com/s/37ht3e9c4mzshkb/uniprot_subset.xml?dl=0" rel="noreferrer">this</a> xml file:</p>
  
  <pre><code>example &lt;- read_xml(file.path("~/Downloads", "uniprot_subset.xml"))
  &gt; example
  {xml_document}
  &lt;uniprot&gt;
   [1] &lt;entry xmlns="http://uniprot.org/uniprot" dataset="Swiss-Prot" created="2011-06-28" modified="2019-01-16" version="35"&gt;\n  &lt;accession&gt;Q6GZX4&lt;/accession&gt;\n  &lt;name&gt;001R_FRG3G&lt;/name&gt;\n  &lt;protein&gt;\n    &lt;recommendedName&gt;\n      &lt;fullName&gt;Putative tr ...
   [2] &lt;entry xmlns="http://uniprot.org/uniprot" dataset="Swiss-Prot" created="2011-06-28" modified="2019-01-16" version="36"&gt;\n  &lt;accession&gt;Q6GZX3&lt;/accession&gt;\n  &lt;name&gt;002L_FRG3G&lt;/name&gt;\n  &lt;protein&gt;\n    &lt;recommendedName&gt;\n      &lt;fullName&gt;Uncharacter ...
   [3] &lt;entry xmlns="http://uniprot.org/uniprot" dataset="Swiss-Prot" created="2009-06-16" modified="2018-06-20" version="22"&gt;\n  &lt;accession&gt;Q197F8&lt;/accession&gt;\n  &lt;name&gt;002R_IIV3&lt;/name&gt;\n  &lt;protein&gt;\n    &lt;recommendedName&gt;\n      &lt;fullName&gt;Uncharacteri ...
   [4] &lt;entry xmlns="http://uniprot.org/uniprot" dataset="Swiss-Prot" created="2009-06-16" modified="2017-09-27" version="18"&gt;\n  &lt;accession&gt;Q197F7&lt;/accession&gt;\n  &lt;name&gt;003L_IIV3&lt;/name&gt;\n  &lt;protein&gt;\n    &lt;recommendedName&gt;\n      &lt;fullName&gt;Uncharacteri ...
   [5] &lt;entry xmlns="http://uniprot.org/uniprot" dataset="Swiss-Prot" created="2011-06-28" modified="2019-01-16" version="31"&gt;\n  &lt;accession&gt;Q6GZX2&lt;/accession&gt;\n  &lt;name&gt;003R_FRG3G&lt;/name&gt;\n  &lt;protein&gt;\n    &lt;recommendedName&gt;\n      &lt;fullName&gt;Uncharacter ...
   [6] &lt;entry xmlns="http://uniprot.org/uniprot" dataset="Swiss-Prot" created="2011-06-28" modified="2017-09-27" version="29"&gt;\n  &lt;accession&gt;Q6GZX1&lt;/accession&gt;\n  &lt;name&gt;004R_FRG3G&lt;/name&gt;\n  &lt;protein&gt;\n    &lt;recommendedName&gt;\n      &lt;fullName&gt;Uncharacter ...
   [7] &lt;entry xmlns="http://uniprot.org/uniprot" dataset="Swiss-Prot" created="2009-06-16" modified="2017-09-27" version="24"&gt;\n  &lt;accession&gt;Q197F5&lt;/accession&gt;\n  &lt;name&gt;005L_IIV3&lt;/name&gt;\n  &lt;protein&gt;\n    &lt;recommendedName&gt;\n      &lt;fullName&gt;Uncharacteri ...
   [8] &lt;entry xmlns="http://uniprot.org/uniprot" dataset="Swiss-Prot" created="2011-06-28" modified="2019-01-16" version="38"&gt;\n  &lt;accession&gt;Q6GZX0&lt;/accession&gt;\n  &lt;name&gt;005R_FRG3G&lt;/name&gt;\n  &lt;protein&gt;\n    &lt;recommendedName&gt;\n      &lt;fullName&gt;Uncharacter ...
   [9] &lt;entry xmlns="http://uniprot.org/uniprot" dataset="Swiss-Prot" created="2009-06-16" modified="2019-01-16" version="44"&gt;\n  &lt;accession&gt;Q91G88&lt;/accession&gt;\n  &lt;name&gt;006L_IIV6&lt;/name&gt;\n  &lt;protein&gt;\n    &lt;recommendedName&gt;\n      &lt;fullName&gt;Putative Kil ...
  [10] &lt;entry xmlns="http://uniprot.org/uniprot" dataset="Swiss-Prot" created="2011-06-28" modified="2017-09-27" version="27"&gt;\n  &lt;accession&gt;Q6GZW9&lt;/accession&gt;\n  &lt;name&gt;006R_FRG3G&lt;/name&gt;\n  &lt;protein&gt;\n    &lt;recommendedName&gt;\n      &lt;fullName&gt;Uncharacter ...
  
  </code></pre>
  
  <p>it behaves differently</p>
  
  <pre><code>xml_find_all(example, "//accession")
  {xml_nodeset (0)}
  </code></pre>
  
  <p>Basically, it will not find any nodes with the 'accession' tag, even though they exist and can be accessed by different functions, for instance using</p>
  
  <pre><code>xml_children(xml_children(example)[1])[1]
  {xml_nodeset (1)}
  [1] &lt;accession&gt;Q6GZX4&lt;/accession&gt;
  </code></pre>
  
  <p>Can anyone tell me why the xml_find_all function does not find any nodes in the latter example?</p>