Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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%';

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011173]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2016-12-11 02:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (168 votes). Check out past polls.