Hi Idisis,
When you are getting DOM, you are using "DataObjects" as a method where as "DataObjects" is a property(variable) so your first statement should be
"XDocument.DataObjects["Test Procedures"].DOM"
Also please check whether you have created your dataconnection to the sharepointlist properly.
NOTE: From here on i will use c# Code because I am not familiar with "Script".
For inserting repeating section
Probably it will work the way you have done it but I dont do the way you do, I do it with the code.
Steps I follow if i want to insert "Field" into a node are
1. Take XML for the section as a string
string xmlString = "<Field1/>"
2. Create an IXMLDOMDocument out of it.
IXMLDOMDocument domXMLNode = (IXMLDOMDocument)thisXDocument.CreateDOM();
3. Load that xml into above dom
domXMLNode.async = false;
domXMLNode.loadXML(xmlString);
4. Get the node in which you want to insert this new node
IXMLDOMNode oParentNode = getParentNode();
5. Append your new node to the parentnode.
oParentNode.appendChild(domXMLNode.documentElement);
You can loop "oParentNode.appendChild(domXMLNode.documentElement)" statement and insert multiple nodes(Repeated nodes).
Hope this Helps!
Agni
InfoPathDev India