title: How to read XMLTYPE data but namespace in SQL/PLSQL (Oracle)
body: <p>I have this piece of XML data in the file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  -&lt;p:FatturaElettronica xsi:schemaLocation="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2 http://www.fatturapa.gov.it/export/fatturazione/sdi/fatturapa/v1.2/Schema_del_file_xml_FatturaPA_versione_1.2.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" versione="FPR12"&gt;
  </code></pre>
  
  <p>This is the root tag. Now I'm trying to extract data. I'm using xpath as the file is more complex. I was successfully able to read data before namespace using <code>EXISTSNODE()</code> and <code>EXTRACT()</code> method of XMLTYPE.</p>
  
  <p>Now the root tag is changed. I cannot process the namespace. I was able to process data by defining namespace as:</p>
  
  <pre><code>DECLARE
  l_ns_def VARCHAR2(240) := 'xmlns:p="http://www.fatturapa.gov.it/sdi/fatturapa/v1.1"';
  BEGIN
  IF l_xml.EXISTSNODE (l_common_path||'FatturaElettronicaHeader/DatiTrasmissione/IdTrasmittente/IdCodice/text()',l_ns_def) &gt; 0 THEN
  l_sender_tic := l_xml.EXTRACT (l_common_path||'FatturaElettronicaHeader/DatiTrasmissione/IdTrasmittente/IdCodice/text()',l_ns_def   ).GETSTRINGVAL ();
  EXCEPTION WHEN OTHERS THEN
  DBMS_OUTPUT.PUT_LINE(' EOOR - '||SQLERRM);
  --END IF;
  END;
  </code></pre>
  
  <p>The variables used l_sender_tic is VARCHAR2(2000)
  L_COMMON_PATH = /p:FatturaElettronica 
  but I cannot extract data now. The error comes as either bind array is too small or ORA-30625: method dispatch on NULL SELF argument is disallowed</p>
  
  <p>I guess the issue is with root tag. The FILE HAS CORRECT syntax that is confirmed. Please help me out on this.</p>