XML Services - XML Shredding

Extensibility

XML Services - XML Shredding

Hi Guys,

With regards to XML shredding, I tried to use SYSXML.XMLXPATH_SHRED1_U but there is an error executing it using my example query below:

select a.* from table(SYSXML.XMLXPATH_SHRED1_U(0,'<ROOT><RPI KEY="11000"><Sales>300</Sales></RPI></ROOT>', null, '/ROOT/RPI', './@KEY{1}, ./Sales/text(){2}')) a;

The error is :

Executed as Single statement.  Failed [7504 : HY000] in UDF/XSP/UDM SYSXML.XPATH_SHRED1_IDNUM_XMLVC_3_U: SQLSTATE U0020: Expected an element name L:1,C:2

Elapsed time = 00:00:02.246

 STATEMENT 1: Select Statement failed.

I much appreciated for any suggestions.

Thanks,

JB

1 REPLY

Re: XML Services - XML Shredding

Copy the content into a file and "save as" the file as UNICODE