Oracle XMLtype query

AFZ

New Member
I'm working my way up the Oracle XML learning curve.I have an XML doc that main contain an 'Error/Text' element at any level. I'd like to query the doc and get the text of each error message as its own record. In my attempts so far, the text gets concatenated together into one record.How can I get them in their own records?Thank you.\[code\]with xmldoc_ as (SELECT xmltype('<B><A><Error><Text>Error #1</Text></Error></A><C><D><Error><Text>Error #2</Text></Error></D></C></B>') object_value from dual)selectXMLcast( XMLquery('//Error/Text' passing object_value returning content) as varchar2(200)) messagefrom xmldoc_\[/code\]
 
Back
Top