The five techniques of XML

Source: Internet
Author: User
Tags object string

Skill 1
  
The difference between xmlnode.innertext and. InnerXml is that the former converts < and > in content to < and, therefore, a program that wants to merge two-segment XmlDocument can only use

Xmldocumentfragment.innerxml = Xmlnode.outerxml

Skill 2

/xpath:string End-with

<xsl:for-each select= "Root/data[substring-after (@name, '. ') =

' Text ' and string-length (value) >0] ">

Skill 3
  
If an XML document fails at load, it is simply illegal, and compliance with a schema (XSD) requirement is a validation (valid) check. The method is to use the schemas and ValidationType properties of the XmlValidatingReader object.

Skill 4
  
The XmlDataDocument class is derived from the XmlDocument, and most importantly, a DataSet attribute is added. However, this class is not provided by System.Xml, but by System.Data. For applications that always have to deal with the database, it is better to quote System.Data than to use XmlDataDocument.

Skill 5
  
How do I save a dataset update in a XmlDataDocument object to a database? The dataset itself has a AcceptChanges method, so you only need to:

XmlDataDoc.DataSet.AcceptChanges ();



Related Article

Alibaba Cloud 10 Year Anniversary

With You, We are Shaping a Digital World, 2009-2019

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.