Hello,
Here is the code you have to write in your onLaod function,
IXMLDOMDocument2 sampleDataDom = (IXMLDOMDocument2)thisXDocument.CreateDOM();
sampleDataDom.async = false;
sampleDataDom.validateOnParse = false;
sampleDataDom.setProperty("SelectionNamespaces", "namespace of your form");
sampleDataDom.load("sampledata.xml");
IXMLDOMNode nodeFromSampledata = sampleDataDom.selectSingleNode("XPath of repeating field node").cloneNode(true);
//Setting the update by field value
nodeFromSampledata.text = "Update by value";
IXMLDOMNode parentNode = thisXDocument.DOM.selectSingleNode("Parent node path");
//Inserting the sample node at first position.
parentNode.parentNode.insertBefore(nodeFromSampledata, parentNode);