xml2::xml_strip_ns() does not work on qualified xml?

Viewed 35

I am trying to use R xml2 method xml_strip_ns on a xsd like this:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <xs:element name="Cell" type="Cell_type"/>
  <xs:complexType name="Cell_type">
    <xs:sequence>
      <xs:element name="ID" type="id"/>
...

in order to be able to do xml_find_first(x,'./element') instead of xml_find_first(x,'./xs:element') but apparently strip does not care of working in this situation (it works with the example given in the function help though). Am I missing something (I am absolutely new to xml so it wouldn't surprise me)?.

Thank you in advance for help, Luigi

0 Answers
Related