I have a multistate approval workflow that is started off of an infopath form library. Using the workflowproperties object, I can load the form into an xml document in memory and manipulate it via nodes. Details on how I am doing it can be found here:
http://www.novolocus.com/2006/08/15/update-infopath-forms-from-within-workflow/
My issue arises when there is a complex or repeating control on the page such as a Contact Selector. If one of those conrols exists on the page, I can read the data but as soon as I save the data and try to open the form, I get the dreaded “Schema validation found non-datatype errors”. It corrupts or changes the schema even on a non-change save (IE where no data is changed). What would I have to do from an XML pre-save side to make sure that the schema is not messed up?
I have already read about the "nil" node thing and I am not changing any nodes that were null.
Has anyone else seen this issue? Any help is appreciated.