Create an xhtml document with the javascript code to open


Exercise 1

In the seminar, Listing 5 showed an improve JavaScript function for printElement() to traverse and list on the screen all elements of the DOM of the XML document in Listing 1. Improve this JavaScript function by adding the functionality to also list on the screen the attributes and their values for each element. Submit the entire XHTML document containing the complete JavaScript code to process the file orders.xml (make sure you test it against the orders.xml file in the examples.zip file).

Exercise 2

Create an XHTML document with the JavaScript code to open and build the DOM tree for orders.xml as in the seminar, but them also loads in and builds another DOM tree for another fileâ?¦ say orders2.xml as shown below



65743
pending

Nike Horse Shoes
120
4


Then build in the functionality to modify the DOM tree for the orders.xml by adding the order for customer ID 65734 from the above listing to the orders.xml DOM. Then list the contents of the orders.xml DOM to the screen to verify this. Please submit the XHTML file containing all the above JavaScript functionality.

(HINT â?¦ use the cloneNode() and appendChild() functions from the Node Functions table in the Seminar)

Attachment:- orders.zip

Solution Preview :

Prepared by a verified Expert
Programming Languages: Create an xhtml document with the javascript code to open
Reference No:- TGS01244891

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)