So this is quite the interesting issue. Apparently InfoPath HATES data sources that are not being used. If you have a data source that's not assigned to anything, say a dropdown list or something, then the form doesn't like life. For example, I had a data source that was in my IP form which was the lookup for a dropdown but then I replaced it with another lookup list. Now this data source is doing nothing, just hanging out, unassigned and alone. The data source gets moody, frustrated and then doesn't play nice with the other objects in the form.

The error I received is:

Type: XmlException, Exception Message: Unexpected end of file has occurred. The following elements are not closed: dfs:dataFields, dfs:myFields. Line 1, position 328.)

Yeah, that really helps! I ran into this one time before, where a rogue data source was causing issues, but I forget the error I was getting then. If I remember, I'll throw it up here. If you happened by this post and are receiving a different error, let me know so I can share with all!

I hope this helps!