EVOLUTION-MANAGER
Edit File: xml_ns_strip.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Strip the default namespaces from a document</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for xml_ns_strip {xml2}"><tr><td>xml_ns_strip {xml2}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Strip the default namespaces from a document</h2> <h3>Description</h3> <p>Strip the default namespaces from a document </p> <h3>Usage</h3> <pre> xml_ns_strip(x) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>A document, node, or node set.</p> </td></tr> </table> <h3>Examples</h3> <pre> x <- read_xml( "<foo xmlns = 'http://foo.com'> <baz/> <bar xmlns = 'http://bar.com'> <baz/> </bar> </foo>") # Need to specify the default namespaces to find the baz nodes xml_find_all(x, "//d1:baz") xml_find_all(x, "//d2:baz") # After stripping the default namespaces you can find both baz nodes directly xml_ns_strip(x) xml_find_all(x, "//baz") </pre> <hr /><div style="text-align: center;">[Package <em>xml2</em> version 1.3.2 <a href="00Index.html">Index</a>]</div> </body></html>