Honestly, trying to implement this as a KeywordTest will be a LOT more convoluted than I think you want. If I have the time later today, I can write up something simple to give an example of how to load an XML into a DOMDocument object from text, parse it for a particular node, and alter the contents of that node. However, I think you might find some ready made code out there for that in places like StackOverflow or something.
Just as a sidenote, I do like the KeywordTest capabilities of TestComplete for being able to visually construct tests based upon onscreen actions and checkpoints. However, there are quite a number of things that, in order to be able to do more complex tests, some coding capabilities will be needed. I'd recommend taking something like a PluralSite course or online tutorial on JavaScript to learn the basic coding techniques and such. You'll become a better automated tester for it. You can start with this one.
https://www.w3schools.com/js/