SQL select XML data in Oracle that is XML 1.1

Gary Antonellis
Gary Antonellis used Ask the Experts™
on
We have data from an external system that is XML 1.1.  When I use Oracle XML functions to select this data I get error in attached screen print, I am using SQL Developer.  Are there other functions I can used for XML 1.1?

Thanks!

SQL Error
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2012
Commented:
1.1 isn't supported until 12c, where it simply treats it as 1.0

interestingly 12c does not support 2.0.

easiest work around is probably a simple text replace

SELECT xmltype(replace(transaction_data,'version="1.1"','version="1.0"')).extract('OPERA2/IDOC/EDI_DC40/MESTYPE/text()').getStringVal()
  FROM interface_in_queue
 WHERE transaction_name = 'OPERA2' AND queue_id = 130454

Open in new window

Gary AntonellisSenior Application Consultant

Author

Commented:
WOrks great!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial