I have a XML document that looks like this:
<Data id="1401" href="http://222222222">
<definition id="12218" href="http://11"></definition>
<Data-List count="1">
<DataStep type="3">
<completed_time>07/04/2017 17:18:11</completed_time>
<status>3</status>
</DataStep>
</Data-List>
<information>abcdefg</information>
</Data>
I would like to change the information data abcdefg to a different piece of string that comes from a different variable.
So it looks like this:
<Data id="1401" href="http://222222222">
<definition id="12218" href="http://11"></definition>
<Data-List count="1">
<DataStep type="3">
<completed_time>07/04/2017 17:18:11</completed_time>
<status>3</status>
</DataStep>
</Data-List>
<information>example</information>
</Data>
Is this possible to do directly in Node JS without changing this XML to a json, modifying it and then converting back to XML? I have tried this however it did not seem to work, creating weird arrays and '$' on the XML conversion.
Any suggestions on how I could do this?
abcdefgbyexample?