Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
What is the role of xmlwritemode and xmlreadmode? Xmlwritemode enumeration is usually used as the second parameter of the dataset. writexml () method. It determines the format used to save XML: ignoreschema -- default value. Write only the data of the dataset without any architecture information. If there is no data in the dataset, no file is generated. Writeschema-Write the schema information of the dataset to The. XSD file while writing data to the. xml file. DiffGram -- write both the original data and the current data. So how can we make the correct choice between the xmlwritemode. writeschema mode and the xmlwritemode. DiffGram mode? You can use the xmlwritemode. writeschema mode to obtain an almost complete dataset, including the schema and data, but the data only has the current value. Xmlwritemode. DiffGram mode can obtain all values in the dataset, including the current value and original value. However, this mode does not have a dataset architecture. The specific mode depends on the purpose. If you want to fill in a new dataset with XML, all rows in the new dataset are completely clean, you should adopt the xmlwritemode. writeschema mode. If you want to transfer changes between different datasets using an XML file, you should select xmlwritemode. DiffGram mode. Xmlreadmode enumeration is usually used as the second parameter of the dataset. readxml () method. It determines how to read XML into the dataset: Auto -- default value. The best method for data gathering to try to read XML. DiffGram -- read DiffGram and apply the changes to dataset. Rowstate is retained. Fragment -- read XML documents. Any inline namespace will be read as the schema. It is mainly used to read standard XML documents. Ignoreschema-ignore the architecture and try to read XML into the existing dataset architecture. data that does not conform to the existing architecture is discarded. If the dataset does not have any architecture, all data is discarded. Inferschema -- ignore all XML schema information and deduce the Schema Based on XML data. Readschema -- read the inline schema information and data and try to add it to the dataset schema. An exception occurs if an architecture already exists in the dataset.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.