views:

53

answers:

1

I'm wondering if anyone out there as built a custom script or stored procedure that will accept a field and an XPath expression to return. Even if it's really clumsy, I'll take it.

Something like this:

FindByXPath(fieldName, query);

Which I would give values:

FindByXPath([xmlContent], '/root/customer/country[@attribute]');

All I need is basic node and attribute selection. I'm using MySQL 5.

+3  A: 

Upgrade to MySQL 5.1. It supports ExtractValue(xml_frag, xpath_expr)

I thought I was using 5.1. Guess not