I want to get the value of the parent child node in XML but the value of the childnode is overriding it because they're of the same name
How do I make it pick the parent node value without the childnode value overriding it?
I'm using LOAD XML LOCAL INFILE
LOAD XML LOCAL INFILE 'person.xml'
INTO TABLE document
ROWS IDENTIFIED BY '<document>';
This is the sample XML data
<document>
<name>John</name>
<age>19</age>
<street>
<name>Johnson Street</name>
</street>
</document>
Instead of the name tag under document tag to print John it's printing Johnson Street