XML Database (MOSC)

MOSC Banner

XVM-01123 on xml parsing

Hi,

I have a problem with SQL below

declare 

 vResult xmltype;

 vSourceXML xmltype := xmltype('<DocumentList>

                 <Document>

                  <RegionISN>3783</RegionISN>

                  <ObjRef>1</ObjRef>

                 </Document>

                 <Document>

                 <ObjRef/>

                 </Document>

                </DocumentList>');

begin

  select xmlquery('/DocumentList/Document[ObjRef=1]/RegionISN' passing vSourceXML returning content) 

into vResult

from dual;  

end;

This script get XVM-01123 [FORG0001] Invalid value for cast/constructor

The problem causes empty ObjRef tag. Is this a known issue?

I know solution - /DocumentList/Document[ObjRef="1"]/RegionISN but as i see it first variant should run too and deprecated ExtractValue function works fine in my case.

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center