|
Which version of JAVA are you using? Complete sysinfo output would be
useful. XML features of Derby currently has a dependency on Apache
Xerces parser and are enabled only from JDK 1.4 or higher. But I
thought Derby would provide a useful error message if this is not
found. I tried this, without Xerces parser being in the
CLASSPATH. ij> connect 'tdb'; ij> create table xmltab (id integer, xml_col xml); ij> 0 rows inserted/updated/deleted ij> insert into xmltab values (1, xmlparse(document '<simp> doc </simp>'preserve whitespace)); ERROR 2200L: XMLPARSE operand is not an XML document; see next exception for details. ERROR XJ001: Java exception: 'SAX2 driver class org.apache.xerces.parsers.SAXParser not found: org.xml.sax.SAXException'. ij> It worked in 10.2 as expected with the parser being in the classpath, so something is missing... Are you using JDK 1.3 by any chance? There is an existing Improvement for 10.2 that may relax dependency on Xerces parser, by using default parser provided by the JVM. But that work is not complete yet. Satheesh Susan Cline 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.0 alpha - (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/[EMAIL PROTECTED] [ 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 |
- Re: XMLPARSE usage? Rajesh Kartha
- Re: XMLPARSE usage? Rajesh Kartha
- Re: XMLPARSE usage? Army
- Re: XMLPARSE usage? Satheesh Bandaram
- Re: XMLPARSE usage? Andrew McIntyre
- Re: XMLPARSE usage? Susan Cline
- Re: XMLPARSE usage? Andrew McIntyre
- Re: XMLPARSE usage? Satheesh Bandaram
