New versions: Dev (3.15) | Latest (3.14)

XMLQUERY

Applies to ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

The XMLQUERY() allows for extracting content from an XML document using XQuery or XPath

SELECT xmlquery('/doc/x'
  PASSING xmlparse(DOCUMENT '<doc><x>content</x></doc>')
  RETURNING CONTENT
)
FROM dual
create.select(xmlquery("/doc/x")
        .passing(
            XML.xml("<doc><x>content</x></doc>")
        ))
      .fetch();

The result would look like this:

+----------+
| xmlquery |
+----------+
| content  |
+----------+

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo