Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

XMLQuery is returning NULL values

timsburkeJun 29 2022

I've search the discussion groups looking for answers and I'm at a loss. I've tried implementing solutions that have worked, but I'm still seeing NULLs returning. I have a table that has a CLOB column called APPLICATION_DATA. Below is an example of the format of the XML:
XMLParse.JPGSo I'm trying to get the contents of Question Name = emailFailedSendToPortal and it's returning NULL. I've tried writing the following statement:

SELECT XMLCast(
XMLQuery(
'declare default element namespace "http://ws.compas.aarp.uhg.com/common/1/4/0/base"; (: :)
declare namespace soapenv = "http://schemas.xmlsoap.org/soap/envelope/"; (: :)
declare namespace wsu = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; (: :)
declare namespace ns2 = "http://ws.compas.aarp.uhg.com/enrollmentservice/4/5/0/enrollmentservice"; (: :)
declare namespace ns3 = "http://ws.compas.aarp.uhg.com/enrollmentservice/4/5/0/common"; (: :)
declare namespace ns4 = "http://ws.compas.aarp.uhg.com/common/1/3/0/employer"; (: :)
declare namespace ns5 = "http://ws.compas.aarp.uhg.com/exception/1/0/0/fault"; (: :)
/ns2:ApplicationInformation/ns3:Questions/QuestionList [@Type="BBA"]/Question [@name="emailFailedSendToPortal"]/ns3:text'
PASSING APPLICATION_DATA RETURNING CONTENT)
as varchar2(80)
) as node_value
FROM OLE_APPLICATION_DETAIL
fetch first 10 rows only

Am I missing something? Are the namespace declarations correct? Any help would be greatly appreciated. TIA!

Comments

Processing

Post Details

Added on Jun 29 2022
8 comments
949 views