Working with XML Data Using the XPathNavigator Class
http://msdn.microsoft.com/en-us/library/bb509311(v=office.12).aspx
Setting the Value of a Node That Has the xsi:nil Attribute
For certain data types, trying to set the value of a blank field programmatically raises the error "Schema validation found non-data type errors." Typically the cause of this error is that the element has the xsi:nil attribute set to true. If you examine the underlying XML element for the blank field in the form, you can see this setting. For example, the XML fragment for the following blank Date field has the xsi:nil attribute set to true.
If the xsi:nil attribute is set to true, it indicates that the element is present but has no value, or in other words, is null. If you try to programmatically set the value of such a node, InfoPath displays the "Schema validation found non-data type errors" message because the element is currently flagged as being null. InfoPath sets the xsi:nil attribute to true for null fields of the following data types:
If the xsi:nil attribute is set to true, it indicates that the element is present but has no value, or in other words, is null. If you try to programmatically set the value of such a node, InfoPath displays the "Schema validation found non-data type errors" message because the element is currently flagged as being null. InfoPath sets the xsi:nil attribute to true for null fields of the following data types:
- Whole Number (integer)
- Decimal (double)
- Date (date)
- Time (time)
- Date and Time (dateTime)
Comments
Post a Comment