|Syntactic Confectionery Delight|
DBI accessing SQLite with XML databy Anonymous Monk
|on Dec 31, 2012 at 08:33 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
I am querying a sqlite database which contains XML data in a TEXT column using DBI.
Here is a sample of the data contained in that column:
<element xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlnssd="http://www.w3.org/2001/XMLSchema"><items><item><data>some text here</data></item></items></element>
Although I can successfully retrieve the content of that column via a SELECT statement and performing some search and replace to get only the content of element/items/item/data, this is unsatisfactory:
I would like to be able to match the content of /element/items/item/data directly against a LIKE expression such as (pseudo-code):
How could I achieve this? What modules would I need?
Thanks for your help.