Skip to Main Content

DevOps, CI/CD and Automation

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!

Problems fecthing with xmltable using xmlnamespaces

gonzarg66Apr 14 2008 — edited Nov 3 2010
Hi, I've the following XML save in a table in a XMLTYE field
<ORU_R01 xmlns="urn:hl7-org:v2xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MSH>
<MSH.1>|</MSH.1>
<MSH.7>
<TS.1>200804090000</TS.1>
</MSH.7>
</MSH>
</ORU_RO1>
When I've tried to retrive it using the SQL statment below, it doesn't fetch any record

select m.*
from HA.Hl7_Messages h,
xmlTable
( XmlNamespaces('urn:hl7-org:v2xml' AS xmlns),
'/ORU_R01'
passing h.msg
Columns
CA VARCHAR2(10) Path 'MSH/MSH.1',
CB VARCHAR2(30) Path 'MSH/MSH.7/TS.1',
) m
I used xmlTable WITHOUT namespaces and works fine, but here I think that is a namespace problem. I've tried adding the namespace (eg,/xmlns:ORU_RO1) in different ways but nothings happens.

Any idea?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 1 2010
Added on Apr 14 2008
5 comments
9,839 views