Using an XmlDocument Object to Store an XML Document

Bạn sử dụng một đối tượng của lớp XmlDocument để đại diện cho một tài liệu XML trong một chương trình C #. Một đối tượng XmlDocument cửa hàng các nút của các tài liệu XML trong các đối tượng của lớp XmlNode. Bạn có thể, ví dụ, dòng tải từ cơ sở dữ liệu vào một đối tượng DataSet, và sau đó tải một đại diện XML của những người hàng vào một đối tượng XmlDocument. Bảng 16,5 cho thấy một số tài sản XmlDocument. | Using an XmlDocument Object to Store an XML Document You use an object of the XmlDocument class to represent an XML document in a C program. An XmlDocument object stores the nodes of the XML document in objects of the XmlNode class. You can for example load rows from the database into a DataSet object and then load an XML representation of those rows into an XmlDocument object. Table shows some of the XmlDocument properties Table shows some of the XmlDocument methods and Table shows the XmlDocument events. Table XmlDocument Properties Property Type Description Attributes XmlAttributeCollection Gets the XmlAttributeCollection object that contains the attributes of the current node. BaseURI string Gets the base URI of the current node. ChildNodes XmlNodeList Gets all the child nodes of the node. DocumentElement XmlElement Gets the root XmlElement object for the XML document. DocumentType XmlDocumentType Gets the node containing the DOCTYPE declaration. FirstChild XmlNode Gets the first child of the node. HasChildNodes bool Gets a bool that indicates whether this node has any child nodes. Implementation XmlImplementation Gets the XmlImplementation object for the XML document. InnerText string Gets or sets the concatenated values of the node and all of its children. InnerXml string Gets or sets the XML that represents the children of the current node. IsReadOnly bool Gets a bool value that indicates whether the current node is read-only. LastChild XmlNode Gets the last child of the node. LocalName string Gets the local name of the node. Name string Gets the qualified name of the node. NamespaceURI string Gets the namespace URI of the node. NameTable XmlNameTable Gets the XmlNameTable object associated Table XmlDocument Properties Property Type Description with the XML implementation. NextSibling XmlNode Gets the node immediately following the current node. NodeType XmlNodeType Gets the type of the current node. OuterXml string Gets the XML that

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
22    79    1    03-06-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.