Syntax
------ 
UpdateXML(xml_target, xpath_expr, new_xml)
 
Description
----------- 
This function replaces a single portion of a given fragment
of XML markup
xml_target with a new XML fragment new_xml, and then returns
the
changed XML. The portion of xml_target that is replaced
matches an XPath
expression xpath_expr supplied by the user. If no expression
matching
xpath_expr is found, or if multiple matches are found, the
function returns
the original xml_target XML fragment. All three arguments
should be
strings.
 
Examples
-------- 
SELECT
 UpdateXML('ccc', '/a', 'fff') AS val1,
 UpdateXML('ccc', '/b', 'fff') AS val2,
 UpdateXML('ccc', '//b', 'fff') AS val3,
 UpdateXML('ccc', '/a/d', 'fff') AS val4,
 UpdateXML('ccc', '/a/d', 'fff') AS val5
 \G
*************************** 1. row
***************************
val1: fff
val2: ccc
val3: fff
val4: cccfff
val5: ccc
1 row in set (0.00 sec)
 

 
 
 
 
 
 
 

URL: https://mariadb.com/kb/en/updatexml/