timport xml

Post Reply
pkoppel
Posts: 4
Joined: Tue May 01, 2007 1:12 pm

timport xml

Post by pkoppel »

I am trying to import some data from and xml load file using timport. Here are my settings:


timport -xml -s timport.sch -d /mnt/data1/texis/ediscovery_06_1562_plaintiff -t -file ~/06_1652_p.xml
200 Reading schema timport.sch
200 Connecting to server
200 Opening database /mnt/data1/texis/ediscovery_06_1562_plaintiff
200 Verifying schema
105 No such table documentSearch In the function: getrowattrs
215 Creating the table(s):
215 create table documentSearch("id" counter,"document_idnum" long,"custodian_idnum" long,"text" varchar(80));
215 grant select on documentSearch to PUBLIC;
200 Loading data
.
204 1 records added
204 1.0 records/sec

Schema file timport.sch

cat timport.sch
xml
table documentSearch
field document_idnum long documentSearch/document/document_idnum
field custodian_idnum long documentSearch/document/custodian_idnum
field text varchar documentSearch/document/body


XML data:
cat ~/06_1652_p.xml
<documentSearch>
<document>
<document_idnum>1</document_idnum>
<custodian_idnum>1</custodian_idnum>
<body>Week Cumulative AE Drops Placebo Citalopram Sertraline N N N </body>
</document>
</documentSearch>

after timport has run i try and select my data from the DB.

tsql
Texis Version 05.01.1175610653(20070403) Copyright (c) 1988-2007 Thunderstone EPI

SQL 1>select * from documentSearch;
id document_idnum custodian_idnum text
------------+------------+------------+------------+
4637695111 1 1


everything is importing fine except the text data is missing.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

timport xml

Post by mark »

"body" is an HTML reserved word.
In the schema try "xml nohtml" instead of "xml".
Post Reply