Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: DBI accessing SQLite with XML data

by Anonymous Monk
on Jan 01, 2013 at 18:17 UTC ( #1011173=note: print w/ replies, xml ) Need Help??


in reply to DBI accessing SQLite with XML data

I would recommend redesigning your database schema. Parse xml and insert into table.

CREATE TABLE mytable ( id INTEGER PRIMARY KEY, element TEXT, items TEXT, item TEXT, data TEXT, UNIQUE(element, items, item, data) );
Then you can do the following:
sqlite> SELECT ("element" || "/" || "items" || "/" || "item" || "/" || + "data") AS source where source like '%some string%';


Comment on Re: DBI accessing SQLite with XML data
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011173]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-11-23 10:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (130 votes), past polls