XML and relational data-use XML and dataset classes

Source: Internet
Author: User
How to use XML and Dataset

These topics describe the interaction between datasets and xmldatadocument objects.

XML data and relational data. Two views of the same data.

XML is usually related to structures (such as novels in a bookstore) and unorganized structures. This topic describes the concept of centralized data storage and providing different views of data, as XML, or as tables, columns, and rows with a relationship. For example, the discontinuous data storage can represent the business objects in the middle layer that execute business rules, and the data can be provided to the browser as XML through the Extensible style table language conversion (XSLT, send data to another Web site over the Internet, or provide data to local applications through Relational Tables.Program. However, after the data is modified, you can update the data to the database based on the transaction.

A dataset indicates the data cache in the memory. It is a set of relationships between tables and these tables. It is actually a locally cached database. It provides discontinuous data caches (similar to messages), allowing you to operate on data blocks. The dataset does not know where the data comes from. It may come from file, database connection, or stream. A dataset provides a relational view of the stored data.

Xmldatadocument provides XML APIs to access the data cache in the memory and supports reading and writing XML. Xmldatadocument is a dataset recognition object. You can create an xmldatadocument to implicitly create a dataset (accessed as an attribute), which provides a view of the relationship between XML data. The symbiotic relationship between the two objects provides a powerful way to access the relevant data or as XML data, regardless of the data generation mechanism.

Differences between xmldatadocument and Dataset

There are many differences between these two objects and their views. The XML loaded by the xmldatadocument load method retains the authenticity of all XML structures and can be accessed through the xml api. The readxml method of the dataset only loads the XML that conforms to the internal created ing (Architecture. It does not retain blank spaces, element sorting, and data that does not conform to the ing relationship. Therefore, datasets do not retain XML authenticity. Data loaded using xmldatadocument that does not conform to the internal ing on the dataset cannot be viewed using the relational API. However, you can always view the relational data through the xml api.

Both the dataset and xmldatadocument can store data. However, they store data in different ways. A dataset uses the writexml method to save the standardized view of data mapped by Link (that is, XML data that conforms to the internal architecture, and its elements are sorted by link architecture. The Save method of xmldatadocument is different from that of xmldatadocument. It stores all XML files loaded to xmldatadocument, including blank spaces and element sorting.

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.