AW: xQuery question

From: Willy Klotz <willyk_at_kbi-gmbh.de>
Date: Tue, 22 Dec 2020 07:51:31 +0100
Message-ID: <!&!AAAAAAAAAAAYAAAAAAAAAJxRhRLvfEhBnlOLJd92a2XCgAAAEAAAAN28kUJGLKxGouk7Qrhu7mMBAAAAAA==_at_kbi-gmbh.de>



Hi Stefan,  

i am not an xml-guy, however we had problems with xml after upgrading from 12.2 to 19.6. One of the fixes was patch 31895670. Maybe this is something which fits in your case.  

Regards  

Wilhelm      

Von: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] Im Auftrag von Stefan Knecht Gesendet: Dienstag, 22. Dezember 2020 03:28 An: oracle-l-freelists <oracle-l_at_freelists.org> Betreff: xQuery question  

Hi all  

Been wrapping my head around this for too long and need a fresh set of eyes :)  

Simple case:  

select xmlquery('xquery version "1.0"; copy $d := . modify insert nodes $parent/$child as last into $d/root return $d ' passing xmltype('<root></root>'), xmltype('<child>123</child>') as "child", xmltype('<parent>456</parent>') as "parent" returning content ) as x from dual;

What I'd expect:  

<root>
<parent>

  <child>123</child>
</parent>
</root>
 

But it's ignoring the parent and giving me only:  

<root>

  <child>123</child>
</root>
 

I can't see why, but I must be missing something obvious.  

Stefan  

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Dec 22 2020 - 07:51:31 CET

Original text of this message