Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XMLQuery Problem with Oracle XE

chloe.trachselMar 30 2017 — edited Apr 9 2017

I have a problem with XMLQuery in Oracle XE.

When I execute the request below in an Oracle XE database, the result I obtained is null.

SELECT XMLQUERY('//people/person'

PASSING BY VALUE c.contentxml RETURNING CONTENT) as xml

FROM xml_column c;

I can’t find an error in that query, so I tried to execute it in an Oracle 12c database. And I got the result I expected.

I found a solution for that problem. The solution is to specify a return clause as shown below.

SELECT XMLQUERY('for $pers in  //people/person return $pers'

PASSING BY VALUE c.contentxml RETURNING CONTENT) as xml

FROM xml_column c;

My question is why do I need to specify the return statement in an Oracle XE database ?

Is there a difference with the XMLQuery between the Oracle XE version and Oracle 12c version ? Or do I need to do anything specific ?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 7 2017
Added on Mar 30 2017
1 comment
411 views