ExtractValue not working for Deeper XMLs
<p>Scope:
To use ExtractValue() in MYSQL to parse xml data.</p>

<p>Issue faced:
ExtractValue() does not give the desired output.</p>

<p>Example,</p>

<p>For the input xml(column name-xml),</p>

<pre><code>&lt;rootData&gt;&lt;rootData&gt;&lt;rootData&gt;&lt;rootData&gt;123&lt;/rootData&gt;&lt;/rootData&gt;&lt;/rootData&gt;&lt;/rootData&gt;
</code></pre>

<p>the ExtractValue(xml,'//rootData') is giving the output as 123, which is correct.</p>

<p>Whereas, For the input xml(column name-xml),</p>

<pre><code>&lt;ThisIsALongElemenetUsedForTesting&gt;&lt;ThisIsALongElemenetUsedForTesting&gt;&lt;ThisIsALongElemenetUsedForTesting&gt;&lt;ThisIsALongElemenetUsedForTesting&gt;12&lt;/ThisIsALongElemenetUsedForTesting&gt;&lt;/ThisIsALongElemenetUsedForTesting&gt;&lt;/ThisIsALongElemenetUsedForTesting&gt;&lt;/ThisIsALongElemenetUsedForTesting&gt;
</code></pre>

<p>the ExtractValue(xml,'//ThisIsALongElemenetUsedForTesting') is not giving the correct output. Rather it is given a NULL value.</p>

<p>Note: If a match for the XPATH is not available it would return a empty string and not NULL</p>

<p>Please help me on how the issue can be resolved. </p>

<p>Thanks in advance.</p>