Tip 1
The difference between XmlNode.InnerText and .InnerXml is that the former changes < and > in the content into < and > respectively. Therefore, programs that want to merge two XmlDocuments can only use
XmlDocumentFragment.InnerXml = XmlNode.OuterXml
Tip 2
/XPath: string end-with
<xsl:for-each select="root/data[substring-after(@name,'.')=
'Text' and string-length(value)>0]">
Tip 3
If an XML document fails to load, it is not legal at all; whether it meets the requirements of a certain Schema (XSD) is a validity check by using the Schemas and ValidationType properties of the XmlValidatingReader object.
Tip 4
The XmlDataDocument class is derived from XmlDocument, and the most important thing is to add a DataSet attribute. However, this class is not provided by System.Xml, but by System.Data. For applications that always have to deal with the database, they have to reference System.Data anyway, so it is better to use XmlDataDocument entirely.
Tip 5
How to save DataSet updates in XmlDataDocument object to database? DataSet itself has an AcceptChanges method, so just:
xmlDataDoc.DataSet.AcceptChanges();