RE: XPathNavigator SetValue wipes out XmlType
- From: wawang@xxxxxxxxxxxxxxxxxxxx (Walter Wang [MSFT])
- Date: Thu, 24 May 2007 08:47:34 GMT
Hi Noremac,
Please see following document:
#Modify XML Data using XPathNavigator
http://msdn2.microsoft.com/en-us/library/zx28tfx1(VS.80).aspx
Specifically, if the child elements or attributes of an element are
inserted, updated, or deleted, then the validity of the element becomes
unknown. This is represented by the Validity property of the element's
SchemaInfo property being set to NotKnown. Furthermore, this effect
cascades upwards recursively across the XML document, because the validity
of the element's parent element (and its parent element, and so on) also
becomes unknown.
When you changed the first element's attributes, its SchemaInfo.Validity
becomes NotKnown; and the XmlType will need Validity with Valid value to
return the correct type.
To fix this, you need to call XmlDocument.Validate again after you changed
the element's attributes.
Hope this helps.
Sincerely,
Walter Wang (wawang@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- References:
- XPathNavigator SetValue wipes out XmlType
- From: Noremac
- XPathNavigator SetValue wipes out XmlType
- Prev by Date: Re: ADO.NET - Working with DataSet
- Next by Date: Docking / positioning the toolbox in Visual Studio
- Previous by thread: XPathNavigator SetValue wipes out XmlType
- Next by thread: ArgumentOutOfRangeException When I Remove ListView items
- Index(es):
Relevant Pages
|