Say I have a table called \"xml\" that stores XML files in a single column \"data\". How would I write a MySQL query that run an XPath and return only rows matching that XPa
SELECT * FROM xml
WHERE EXTRACTVALUE(data, '') != '';
You should note, however, that there are limitations to MySQL's support of XPath.
EXTRACTVALUE()
returns only CDATA.