In one of the prototypes I was working on I had to programmatically populate an InfoPath form with data.
After loading the required data and serializing it to the required schema I thought calling “thisXDocument.DOM.loadXML(strXmlData)” should do the job of populating the form with the data.
That call, however, triggers a “The DOM can’t be loaded twice” error.
After a quick search in the SDK help I came up with the following solution (which merges two DOMs):
IXMLDOMDocument newDOM = thisXDocument.CreateDOM();
newDOM.loadXML(strXmlData);
thisXDocument.ImportDOM(newDOM);
Similar Posts:
- The New Google App Engine Blobstore API – First Thoughts
- Weekend Inspirations – Big Data Visualizations, Innovative Man-Machine Interactions
- Data Mining – Handling Missing Values the Database
- Introduction to MapReduce for .NET Developers
- Microsoft’s Next Killer OS is… SharePoint?
Tags: InfoPath, Microsoft Office, OBA


Leave a Comment