title: how to get node name in Oracle SQL extract() with xPath (10g)
body: <p>Here is a XML file: </p>
  
  <pre><code>&lt;ROOT&gt;
  &lt;A&gt;
      &lt;B&gt;2&lt;/B&gt;
      &lt;C&gt;3&lt;/C&gt;
      &lt;D&gt;4&lt;/D&gt;
  &lt;/A&gt; 
  &lt;/ROOT&gt;
  </code></pre>
  
  <p>How to get the <strong>tag</strong> name "C" through xPath. The function name() does not work here in extract.</p>
  
  <p>It reports Errors: </p>
  
  <pre>
  ORA-31011: XML parsing failed
  ORA-19202: Error occurred in XML processing
  LPX-00601: Invalid token
  </pre>
  
  <p><code>gXmlDOM</code> is the xml string above, how to do this in SQL?</p>
  
  <pre><code>select XMLType(gXmlDOM).extract(p_xmlPath).getStringVal() from dual;
  </code></pre>