title: How to extract XML Value in Oracle Database
body: <p>I have a table in an Oracle 12c Database that contains a XML Type Column and i need to extract a value from this Column.
  Here an example of this Column's content:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;AbcMsg xmlns="http://example.org/SCL/CommonTypes"&gt;
    &lt;Msg&gt;
      &lt;Pmnt&gt;
        &lt;swif:SWIFT MT="202" xmlns:swif="urn:abc/scl/SWIFT" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
          &lt;swif:Header&gt;
            &lt;swif:Input_Output_Identifier&gt;O&lt;/swif:Input_Output_Identifier&gt;
            &lt;swif:Sender_BIC&gt;XXXXXXXXXXX&lt;/swif:Sender_BIC&gt;
            &lt;swif:Receiver_BIC&gt;XXXXXXXXXXX&lt;/swif:Receiver_BIC&gt;
            &lt;swif:Message_Priority&gt;NORM&lt;/swif:Message_Priority&gt;
            &lt;swif:User_Header&gt;
              &lt;swif:Message_User_Reference&gt;XXXXXXXXXXXXXXXXX&lt;/swif:Message_User_Reference&gt;
            &lt;/swif:User_Header&gt;
            &lt;swif:Original_Swift&gt;
              &lt;swif:Message&gt;DATA TO BE EXTRACTED&lt;/swif:Message&gt;
            &lt;/swif:Original_Swift&gt;
            &lt;swif:Create_Date_Time&gt;2016-07-28T15:45:00&lt;/swif:Create_Date_Time&gt;
            &lt;swif:Msg_ID&gt;POFu7yCXHoN&lt;/swif:Msg_ID&gt;
            &lt;swif:Sequence_Number&gt;248600&lt;/swif:Sequence_Number&gt;
            &lt;swif:Session_Number&gt;6184&lt;/swif:Session_Number&gt;
          &lt;/swif:Header&gt;
          &lt;swif:Data xsi:type="swif:Data_202"&gt;
            &lt;swif:F20&gt;
              &lt;swif:Sender_s_Reference&gt;POFu7yCXHoN&lt;/swif:Sender_s_Reference&gt;
            &lt;/swif:F20&gt;
            &lt;swif:F21&gt;
              &lt;swif:Related_Reference&gt;XXXXXXXXXXX&lt;/swif:Related_Reference&gt;
            &lt;/swif:F21&gt;
            &lt;swif:F32A&gt;
              &lt;swif:Currency&gt;USD&lt;/swif:Currency&gt;
              &lt;swif:Amount&gt;156020000&lt;/swif:Amount&gt;
              &lt;swif:Date&gt;2016-07-28&lt;/swif:Date&gt;
            &lt;/swif:F32A&gt;
            &lt;swif:Cdrt_F58a_F59a&gt;
              &lt;swif:Account&gt;174208531&lt;/swif:Account&gt;
              &lt;swif:Identifier_Code&gt;XXXXXXXXX&lt;/swif:Identifier_Code&gt;
            &lt;/swif:Cdrt_F58a_F59a&gt;
          &lt;/swif:Data&gt;
        &lt;/swif:SWIFT&gt;
      &lt;/Pmnt&gt;
      &lt;Extn/&gt;
    &lt;/Msg&gt;
  &lt;/AbcMsg&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I need to retrieve the Value of <code>&lt;swif:Original_Swift&gt;</code>. I've tried the function EXTRACT(xml_column, '/AbcMsg/Msg/Pmnt') but it keeps returning null.</p>
  
  <p>Any clue on how to do that???</p>
  
  <p>Thanks in Advance.</p>