Sharepoint – Infopath : Schema validation found non-datatype errors
You may get the ‘Schema validation found non-datatype errors’ when opening an InfoPath form after it has been updated programatically.
Cause is -
White space is not being preserved when using xpath to update the form.
Solution is set PreserveWhiteSpace =True on XMLDocument object.
XmlDocument originalDoc = new XmlDocument(); s = originalItem[0].File.OpenBinaryStream(); originalDoc.Load(s); originalDoc.PreserveWhitespace = true;
leave a comment