How Do I Change Variables in CDATA section of an XML document?

I have an XML file containing a CDATA section, for example :

<?xml version="1.0" encoding="UTF-8"?>
<Header>
	<Test1>Hello</Test1>
</Header>
<MsgPayload><![CDATA[<?xml version="1.0" encoding="UTF-8" ?><Test>1234</Test>]]></MsgPayload>
<Footer>
	<MessageID>String</MessageID>
</Footer>

I’m trying to work out a way that I can read and change the node of Test in the CDATA section but it proving difficult.
First off I would like to be able to read the ‘1234’ as an output, secondly I would like to be able to replace that value and be able to read that out too.
There will be hundreds of these nodes in the actual work that I am doing so is there an easy way of doing this?
I have tried multiple different ways but have not been able to get anywhere with it…

Thanks for any help provided.

Hard to answer specifically with the limited example, but I would open the file in a text editor (or some other program) then use Eggplant to use that program as a user would. Meaning, scrolling looking for instances of the item you are looking for, reading the text from the found locations into variables, manipulating then as needed, then changing them back in the original document as needed.