The biggest problem when programmatically filling out the form, is to find out the Node names. However when you parse for getting elements with the tag xs: element, there is no node name because the element is sometimes 2 or 3 child nodes down. So you can either write a DOM node tree iterator or you can write out the XML in readable format and manually parse the node names. Then you can programmatically fill it in with a custom module.
If anyone needs example code to do this, ping me.