var books = xmldso.selectSingleNode("booklist").selectNodes("book"); for(var i=0; i alert(books [i].selectSingleNode("title").text); }
I would also like to say a few words about xmldso. I once worked on a project. The early stage was done by a few talented people in Taiwan. MVC, the following is my summary of the project:
XXX Framework: XXX is the MVC pattern used. Data, control and view are separated from each other. JSP is responsible for the view, Servlet is responsible for the control, and DataModule is responsible for the storage of data. Take the Model part: Advantages: You can use event listener to write business logic, visual management, especially supports master-detail (master-sub table structure), look-up (search, making its function equivalent to that in the database) View), format (formatting), etc. Disadvantages: Company employees must be familiar with DataModule. DataModule is not a mainstream technology, and not many people can use it - especially Java programmers. The IDE generates a large amount of code for the Datamodule, but it also reduces a large number of SQL statements. During the operation of the system, multiple tables often need to be operated at the same time. In order to ensure the integrity of the data and the reliable execution of complex operations, DataModule automatically performs transaction processing, reducing the development tasks of programmers. Control part: Advantages: Defining system external behavior through pd.xml, such as adding, modifying, deleting, querying, including settings Permissions (not currently implemented, but already reflected in the design), etc. Convert user operations into datamodule operations. Choose the appropriate view for display.
View part: Advantages: 1): Front-end functions (onclick, onfocus, onblue, onchange), using xslt, which reduces a lot of jsp Code. 2): Display uses XML-DSO, IE automatically performs data binding. Disadvantages: 1): Must use IE6. Other systems will not run properly. 2 ): Due to the use of XML-DSO, the requirements for programmers are very high. 3): Since many detections and calculations are performed on the client, the so-called "fat client" is formed, and the result is: concentrated functions , not conducive to updates and maintenance.
Process 1): The client sends a request request to the server. 2): The server receives the request through the control Servlet, parses the request, and assigns it to the appropriate Business Object 3) The controller passes some necessary request information to DataModule 4): Business Object updates (add, modify, delete, etc.) Model, Model synchronizes DataBase 5): Controller executes Jsp Page, the execution results are temporarily stored. 6): Model information is packaged into xml data 1): The client sends a request request to the server. 2): The server receives the request through the control Servlet, By parsing the request, assign it to the appropriate Business Object 3) The controller passes some necessary request information to the DataModule 4): Business Object updates (add, modify, delete, etc.) Model, Model synchronizes DataBase 5): The controller executes the Jsp page, and the execution results are temporarily stored. 6): The Model information is packaged into xml data 7): Combine the xml data with the execution results of the Jsp page, and respond to the client together .
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn