TAILIEUCHUNG - Work with the XML Document Object Model

Làm việc với các tài liệu XML Object Model Tôi muốn có kiểm soát nhiều hơn các tài liệu XML như tôi tạo ra nó. Tôi nghe nói rằng tôi có thể làm điều này với XML DOM. Làm thế nào để làm việc với các tài liệu XML Object Model? | Work with the XML Document Object Model I want to have more control over the XML document as I create it. I heard that I can do this with XML DOM. How do I work with the XML Document Object Model Technique In How-Tos and you saw two ways to independently read and write XML documents. However what if you want to do both at the same time To have this kind of flexibility you need to use the XML Document Object Model also known as DOM. The DOM class is an XML document that is represented in memory. It allows you not only to programmatically read and write out XML documents but also to modify those documents in memory. Within the DOM the XMLNode object is the base object in the DOM Tree XMLDocument class that extends it. XMLDocument has methods that allow you to perform operations on the document as a whole. It also lets the developer work with the nodes in the entire XML document. Both XMLNode and XMLDocument have performance and usability enhancements over prior versions. The properties and methods of XMLNode and XMLDocument that will be used for this How-To are listed in Table . Table . DOM Properties and Methods Used in This How-To Class Name Property Method Purpose Description XMLDocument LoadXML Loads an XML document into the XMLDocument object. In this case it is a means to create the stub for the XML document that will be created from the dataset. XMLDocument DocumentElement Serves as the root element for the document. It is in fact of the type XMLElement. XMLDocument CreateNode Creates an XMLNode object. XMLElement AppendChild Appends the node created to the element specified as a child. XMLDocument CreateComment Adds a comment to the XML document. XMLNode AppendChild Appends a node to another node as a child. XMLDocument Save Saves the current XML document. Steps Open and run the Visual Basic .NET-Chapter 12 solution. From the main Web page click on the hyperlink with the caption How-To Working with the XML Document Object Model. As

Đã 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.