-------------+-----------------+
Matches
-------
Important: The EXTRACTVALUE() function only returns CDDATA. It does not return
tags that the element might contain or the text that these child elements
contain.
SELECT
EXTRACTVALUE('Personx@example.com',
'/cases')
AS Case;
+--------+
| Case |
+--------+
| Person |
+--------+
Note, in the above example, while the XPath expression matches to the parent
instance, it does not return the contained tag or its content.
Examples
--------
SELECT
ExtractValue('cccddd', '/a') AS val1,
ExtractValue('cccddd', '/a/b') AS val2,
ExtractValue('cccddd', '//b') AS val3,
ExtractValue('cccddd', '/b') AS val4,
ExtractValue('cccdddeee', '//b') AS val5;
+------+------+------+------+---------+
| val1 | val2 | val3 | val4 | val5 |
+------+------+------+------+---------+
| ccc | ddd | ddd | | ddd eee |
+------+------+------+------+---------+
URL: https://mariadb.com/kb/en/extractvalue/https://mariadb.com/kb/en/extractvalue/