By using either PL/SQL or SQL I'm trying to extract specific XML values from a database CLOB column.
Table : PDI_SUBMITTED_XML
(PSX_AGREEMENT NUMBER(10),
PSX_DOCUMENT CLOB)
For example I'm trying to extract the value "Broker Region" from the BranchName tag below from the actual CLOB contents.
<?xml version="1.0" encoding="UTF-8"?>
<tns:AgreementWrapper xmlns:tns="http://ws.pancredit.com/wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:Agreement>
<tns:AdminFee>199</tns:AdminFee>
<tns:AdminFeeFinanced>true</tns:AdminFeeFinanced>
<tns:Affordability>
<tns:DownturnReason/>
</tns:Affordability>
<tns:AgreementNumber>13498443</tns:AgreementNumber>
<tns:BankAccountAlreadyValidated>false</tns:BankAccountAlreadyValidated>
<tns:BankAccountNumber>70872490</tns:BankAccountNumber>
<tns:BankSortCode>404784</tns:BankSortCode>
<tns:BranchName>Broker Region</tns:BranchName>
<tns:BrandName>Rtl - VAT Assist Brand</tns:BrandName>
Up to now I've found no solution that will do this, someone has mentioned XMLPATH but see not many examples on internet that does it for the above example.
Does anybody have a solution to what seems simple enough to do but I've had no success up to now.