Scalable markup language XML
1. What is XML first?
XML is short for eXtensible Markup Language.
In the. NET Framework, XML is a very important part. It is used to describe data and is a powerful tool for processing structured document information.
2. XML has the following features:
① No pair of tags in XML are usually called nodes. They appear in pairs and must appear in pairs to describe the content stored on this node.
② Each node used to describe data in XML can be expanded by itself, that is, the tag used to describe information in XML is not fixed.
③ The nodes in the XML file are case sensitive.
3. What is the syntax difference between XML and HTML?
① Not all HTML tags need to appear in pairs, such as <p>, <br>.
XML requires that all tags appear in pairs.
② HTML tags are case-insensitive, while XML tags are the opposite.
4. Read an XML document and use the XmlDocument object. XML nodes are represented by the XmlNode object.
5. The DocumentElement attribute of the XmlDocument object can get the root node of the XML document, and the ChildNodes attribute can get all child nodes.
6. TreeView is used to display information with hierarchies. Its main attributes include Nodes and SelectNode. The Nodes attribute contains the TreeView top-level subnode set. SelectNode indicates the selected node.
7. TreeNode indicates the Node object of the TreeView. The Text attribute is used to set the Text description of a node. The Tag attribute can be used to set information related to the node.
8. You can use the Add () method of TreeNode to Add nodes to the TreeView. The Remove () method can Remove the specified node. The Clear () method can Remove all nodes under the specified node.