XML Table Problems

6 views
Skip to first unread message

mgarren

unread,
Jul 20, 2010, 2:46:36 PM7/20/10
to CloudBase
I am trying to create an XML table for use with CLOUDBASE as I have
had success in creation of a CSV data table but would prefer it be
xml. Here's what I have done:

CREATE XML TABLE TEST
(
COLUMN1 INT 'column1'
)
ROOT TAG 'data';

SAMPLE XML(test.xml):
<?xml version="1.0"?><data><column1>123456</column1></data>

INSERT INTO TEST IMPORT DATA FROM 'path-to-xml/test.xml';

I am doing all of this via Squirrel and when I try the following
query:

SELECT * FROM TEST;

All I get is a null value. What am I doing wrong? Or is this just a
problem with Squirrel not properly displaying the data?

Thanks,
Matt

mgarren

unread,
Jul 20, 2010, 3:26:58 PM7/20/10
to CloudBase
I actually figured it out. In case anyone is interested, when you
specify the create statement, instead of 'column1', it should be '//
column1' per XPATH specifications.
Reply all
Reply to author
Forward
0 new messages