C # xml Operation Analysis

Source: Internet
Author: User

The XML file is a tree structure.

The basic components are nodes, node attributes, node values, and document declarations.

XML is used to store data in a tree format.

For data operations, add, delete, query, and modify data.

That is, a specific function is bound to add, query, modify, and delete nodes, node attributes, and node values in the XML file. Different languages correspond to different function names.

However, no matter which aspect of addition, deletion and modification, the first step is to find the node, or node attribute, or node value. That is to say, the first step is to query.

You can query this operation in two ways.

A is similar to datareader. It only reads forward data. The memory does not store historical data and only reads the current data.

B is similar to dataset. It reads the entire XML document and stores it in memory.

A and B are not both superior and inferior, but the price/performance ratio is different in different occasions. However, a is more secure and can be used more. That is to say, in any scenario, if you do not want to choose, you have to use a general purpose, so you can use the solution.

The search algorithm has an important impact on the speed of this operation. In most cases, non-algorithm engineers do not have to consider this. Because the algorithm engineer has encapsulated it for you.

This is the irresponsible C # operation XML analysis.

 

Related Article

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.