I have some xml data on a MariaDB database and need to do some parsing. I ve tried using the following code to extraxt some values but no matter what i may try i keep getting null as output
SELECT xmlResponse FROM myDataBase.xmlLogging where id = '1' INTO @xml;
SELECT ExtractValue(@xml, 'node2');
tried also count(node2)
to try identify if there is somtheting wrong in my syntaxaccording to this
my xml structure looks like this, with namespacess
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns:SMnamespace xmlns:ns="http://somenamespace.com/WS/">
<ns:Error_spcCode>0</ns:Error_spcCode><ns:Error_spcMessage/>
<ListofData xmlns="http://www.vendor.com/namespeceIO">
<node1>
<node2>text</node2>
<node3>text</node3>
<node4/>
</node1>
</ListofData>
</ns:SMnamespace>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>'