I need to convert an oracle table into xml and then return it to table form.
I converted a table using xmlgen, but I don't know how to reverse the conversion. I'm looking for an example of converting an xml file into a table.
I need to convert an oracle table into xml and then return it to table form.
I converted a table using xmlgen, but I don't know how to reverse the conversion. I'm looking for an example of converting an xml file into a table.
Maybe Hyperjaxb is what you need?
It can build databse schemas from XML and vice versa and generate Object Bindings to convert between DB and XML and vice versa:
Depending on what you're ultimately trying to do, a simple way is to use XMLSequence() and Table() functions in SQL to convert a nodeset from an Xpath into a rowsource:
SELECT
t.extract( '/bar/@id' ).getNumberVal() ID
FROM
TABLE( XMLSEQUENCE(
XMLTYPE(
'<foo><bar id="1" /><bar id="2" /></foo>'
).extract( '//bar' )
) ) t