Oracle 18c 10.7.1 GDB:
The ArcGIS system table docs have an example for extracting domain codes and descriptions from XML:
Example: Resolving domain codes to description values using SQL
--simplified:
select
extractvalue(codedvalues.column_value,'CodedValue/Code') as domain_code,
extractvalue(codedvalues.column_value,'CodedValue/Name') as domain_description
from
sde.gdb_items_vw items
cross join
xmlsequence(xmltype(definition).extract('/GPCodedValueDomain2/CodedValues/CodedValue')) codedvalues
where
items.name is not null
That example uses the EXTRACTVALUE function to get domain codes and descriptions.
But when I look the Oracle docs, they say this about EXTRACTVALUE:
The EXTRACTVALUE function is deprecated. It is still supported for backward compatibility. However, Oracle recommends that you use the XMLTABLE function, or the XMLCAST and XMLQUERY functions instead.
So instead of using EXTRACTVALUE, I want to use XMLTABLE, since that's what Oracle recommends. And also because XMLTABLE is said to be significantly faster: Oracle Database XMLTable vs ExtractValue performance
Question:
How can I use XMLTABLE to get domain codes and descriptions from GDB_ITEMS_VW?