Hello, I would like some help to remedy a problem I am facing. I need to rename the tags of an xml file by nodejs. I thought about making use of regex, using fs to read the file, but I was kind of lost.
<RESULTS>
<ROW>
<COLUMN NAME="DATA_CRIACAO"><![CDATA[24/08/18]]></COLUMN>
<COLUMN NAME="PLACA"><![CDATA[ABC456]]></COLUMN>
<COLUMN NAME="CHASSI"><![CDATA[XXXXXXXXXXXXXXX]]></COLUMN>
</ROW>
<ROW>
<COLUMN NAME="DATA_CRIACAO"><![CDATA[23/08/18]]></COLUMN>
<COLUMN NAME="PLACA"><![CDATA[ABC123]]></COLUMN>
<COLUMN NAME="CHASSI"><![CDATA[YYYYYYYYYYYYYY]]></COLUMN>
</ROW>
Inside ROW we have ....., I need to rename each line of this to the content that is within NAME.
For example, rename from:
<COLUMN NAME="DATA_CRIACAO"><![CDATA[24/08/18]]></COLUMN>
To:
<DATA_CRIACAO><![CDATA[24/08/18]]></DATA_CRIACAO>
Thank you for your attention, thank you!