I was working on an InfPath form today and ran up against an old friend, “Unhandled exception when rendering form System.Xml.XmlException: Unexpected end of file while parsing Name has occurred.”
This happened to me a long time ago and I don’t know what exactly I did to resolve it. Honestly, I think that I had been transitioning to a new project and never saw this one resolved (my replacements had to deal with that headache). I do remember it was a devil of a problem. I spent several unsuccessful days dealing with it. Since then, I’ve seen this come up on MSDN forums at least once over the last year and never really saw an answer for it.
I hit it today and fortunately this time , I had just made a change to the form. I backed out that change and the problem went away. It turns out that it’s possible to create a from template using InfoPath Designer in such a way that it generates a parse error on the forms server side of the fence.
In my case, the problem was caused by these steps:
- Add a new element to a data source as a text field.
- Drop it onto the form.
- Change it’s display into a drop down list.
- Tell the drop down list to pull its values from a SharePoint custom list.
I don’t know if those steps cause a problem or maybe, somehow the data in the list itself is a problem. I’m going to experiment a bit and see if I can nail downt he parameters of this with any more detail.
Subscribe to my blog.
Follow me on Twitter at http://www.twitter.com/pagalvin