I have an xml which may have multiple child tags. There may be 1 or more child xml tags. Based on a condition of a xml tag value of a specific xml tag, I need to modify (find/replace) value of another xml tag.
Example below:
<InvoiceDocument>
<Invoice>
<InvoiceNumber nil="False">299995395</InvoiceNumber>
<NetSum nil="False">109.33</NetSum>
<SupplierCode nil="False">10080673</SupplierCode>
<CodingRows>
<CodingRow>
<AccountCode nil="False">990080</AccountCode>
<AccountName nil="False">Prepaid - Adv</AccountName>
<Text1 nil="False"></Text1>
<Text2 nil="False">1000</Text2>
<Text3 nil="False">12242099-XY300</Text3>
</CodingRow>
<CodingRow>
<AccountCode nil="False">990080</AccountCode>
<AccountName nil="False">Prepaid - Adv</AccountName>
<Text1 nil="False"></Text1>
<Text2 nil="False">1000</Text2>
<Text3 nil="False">12242099-XY810</Text3>
</CodingRow>
</CodingRows>
<InvoiceRows />
</Invoice>
</InvoiceDocument>
CodingRow can be multiple child elements, in my example above there are 2.
Based on the value of AccountCode of the CodingRow - if the value is 990080 then AccountCode value to be set to XY300 which is from Text3 (portion after hyphen) of the same CodingRow. Also the AccountName to be replaced by a set value as per AccountCode. The same logic needs to be applied to all toe Coding Rows.
Expected Output is:
<InvoiceDocument>
<Invoice>
<InvoiceNumber nil="False">299995395</InvoiceNumber>
<NetSum nil="False">109.33</NetSum>
<SupplierCode nil="False">10080673</SupplierCode>
<CodingRows>
<CodingRow>
<AccountCode nil="False">XY300</AccountCode> <!-- 990080 replaced by XY300 from Text3-->
<AccountName nil="False">AccountName1</AccountName> <!-- Prepaid - Adv replaced by a specific name "AccountName1" for the account-->
<Text1 nil="False"></Text1>
<Text2 nil="False">1000</Text2>
<Text3 nil="False">12242099-XY300</Text3>
</CodingRow>
<CodingRow>
<AccountCode nil="False">XY810</AccountCode> <!-- 990080 replaced by XY810 from Text3-->
<AccountName nil="False">AccountName2</AccountName><!-- Prepaid - Adv replaced by a specific name "AccountName2" for the account-->
<Text1 nil="False"></Text1>
<Text2 nil="False">1000</Text2>
<Text3 nil="False">12242099-XY810</Text3>
</CodingRow>
</CodingRows>
<InvoiceRows />
</Invoice>
</InvoiceDocument>
Is it something that can be achieved via Knime?
Thanks for your time and suggestions.