db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajesh Kartha <karth...@gmail.com>
Subject Re: XMLPARSE usage?
Date Tue, 14 Feb 2006 19:44:01 GMT
The 10.2 build you have is an old one. Try in the latest codeline and it
should work.


ij> create table xmltab (id integer, xml_col xml);
0 rows inserted/updated/deleted
ij> insert into xmltab values (1, xmlparse(document '<simp> doc
</simp>'preserve whitespace));
1 row inserted/updated/deleted
ij> insert into xmltab values (1, xmlparse(document '<simp> doc </simp>'
preserve whitespace));
1 row inserted/updated/deleted
ij> insert into xmltab values (6, xmlparse(document '<half> <masted> bass
</masted> boosted. </half>' preserve whitespace));
1 row inserted/updated/deleted


Regards,
Rajesh

On 2/14/06, Susan Cline <home4slc@pacbell.net> wrote:
>
> Hi,
>
> I'm trying to use the XMLPARSE functionality that I believe is available
> in the 10.2 snapshot
> jars;
>
> truncated sysinfo output:
>
> [C:\derby\db-derby-snapshot-10.2.0.0-372122\lib\derby.jar] 10.2.0.0 alpha
> - (372122)
> [C:\derby\db-derby-snapshot-10.2.0.0-372122\lib\derbytools.jar] 10.2.0.0alpha -
> (372122)
>
> I found this post from May 2005 that had the correct usage at the time the
> initial patch was
> posted:
>
>
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200505.mbox/%3C4294CF0A.5060406@sbcglobal.net%3E
>
> [ from the above post ]
>
> Syntax is as follows:
>
> XMLPARSE( DOCUMENT <string-value-expression> PRESERVE WHITESPACE )
>
> Ex:
>
> ij> INSERT INTO xTable VALUES (1, XMLPARSE(DOCUMENT '<simp> doc </simp>'
> PRESERVE WHITESPACE));
> 1 row inserted/updated/deleted
>
> [ end post ]
>
> However, when I try the following I get errors:
>
> ij> create table xmltab (id integer, xml_col xml);
>
> ij> insert into xmltab values (1, xmlparse(document '<simp> doc
> </simp>'preserve whitespace));
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
>
> ij> insert into xmltab values (1, xmlparse(document '<simp> doc </simp>'
> preserve whitespace));
> ERROR 40XT0: An internal error was identified by RawStore module.
>
> Has the syntax for XMLPARSE changed?
>
> If so, can someone post the correct syntax?  Similarly, if the syntax for
> XMLSERIALIZE and
> XMLEXISTS has changed I'd like that information as well.
>
> Thanks!
>
> Susan
>

Mime
View raw message