C # XML operations: a class for processing XML files (1)

Source: Internet
Author: User
C # XML operations (7)
Chapter 4: common XML processing methods (1)
Since we can use DATASET to operate XML files, it is really convenient. He has the ability to use an XML file as a table. Why not?
Therefore, we can operate XML in the same way as a C # class to complete database-like operations:
Using System;
Using System. Text;
Using System. IO;
Using System. Xml;
Using System. Data;
Namespace XmlBook. Com. Sem. Tools
{
/// <Summary>
/// Copyright: Copyright by sem it Department
/// Version: 0.0.1
/// File: XmlBook. Com. Sem. Tools. XmlDataBase. cs
/// Objective: to provide some methods for processing XML as a database
/// By Ouyang Yuntian @
// Email: outrace@soueast-motor.com
/// Modify:
/// </Summary>
Public class XmlDataBase
 {
# Region private Member
Private string strDataFile = null;
/// <Summary>
/// Dataset
/// </Summary>
Private DataSet myDs = null;
/// <Summary>
/// Character filter array, for example, "id = '1' and userName = 'track '"
/// </Summary>
Private string strFilter = null;
/// <Summary>
/// Sort fields such as "id desc, userName"
/// </Summary>
Private string strSort = null;

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.