Hello everyone, i'm a beginner with Node-RED and I would like to modify the value of all the "PORT" tags of a XML file that looks like this :
<SR><STATE><SYSERROR>TRUE</SYSERROR><PLXR>FALSE</PLXR><CHAMPWR>ON</CHAMPWR><MIX>ON</MIX><8100MIX>ON</8100MIX><PLXRMIX>ON</PLXRMIX><PLXRFAN>ON</PLXRFAN><CHAMBER><ATT>0</ATT><POS>CLOSED</POS><PORT>0</PORT></CHAMBER><V2>0</V2><V3>0</V3><V4>0</V4><GAS>0</GAS><INSTRUMENT>ACTIVE</INSTRUMENT><CUROB>1</CUROB><TOTALOB>12001</TOTALOB><OBCOMPLETE>42</OBCOMPLETE><NEXTOB>0</NEXTOB><PURGETYPE></PURGETYPE><PURGING>0</PURGING><IRGA>READY</IRGA><VIN>OK</VIN><GPS>FALSE</GPS></STATE></SR><CRC>3975194949</CRC>
<SR><DATA><TIME>20200303140128</TIME><CO2>650.84</CO2><CPRIME>656.68</CPRIME><CO2ABS>0.12116</CO2ABS><H2O>8.891</H2O><H2OABS>0.06417</H2OABS><BENCHPRESSURE>95.92</BENCHPRESSURE><BENCHTEMP>51.2</BENCHTEMP><CHAMBERTEMP>21.21</CHAMBERTEMP><BOARDTEMP>31.8</BOARDTEMP><VIN>12.12</VIN><RAWCO2>2808932</RAWCO2><RAWCO2REF>3433053</RAWCO2REF><RAWH2O>1674283</RAWH2O><RAWH2OREF>1784228</RAWH2OREF><FLUX>0.2</FLUX><RH>33.73</RH><V1>0.739</V1><V2>0.276</V2><V3>0.194</V3><V4>-0.068</V4><T1>21.62</T1><T2>-190.89</T2><T3>-190.89</T3><T4>183.62</T4><LATITUDE>0</LATITUDE><LONGITUDE>0</LONGITUDE><STATUS>0</STATUS><SPEED>0</SPEED><COURSE>0</COURSE></DATA></SR><CRC>2937005336</CRC>
So I've been inspired by my teacher who made a dashboard from the values of the "CO2", "H20", "bench pressure" and "bench temp" tags :
but when I try to do the same to change the value of from lines from 0 to1, it just seems like they are not in the msg.payload (we can't see STATE but only DATA in the debug window):
I would be really thankful if someone knows where is my mistake