In PL/SQL, is it possible to convert XML into a table split by tag and value without hardcoding any columns?
Example XML:
<responseObject>
<error>That is not a valid request</error>
<errorCode>A11</errorCode>
<value>A</value>
</responseObject>
Example output:
Tag Value
------------------------------------------------------
error That is not a valid request
errorCode A11
value A
I managed to get specific values by declaring the COLUMNS
and PATH
in a XMLTABLE
query by hardcoding error
, but I would like to do this dynamically since the tags in the responseObject
can vary. I am trying to put all of this into an associative array.