From the course: XML Essential Training (2018)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Bringing it all together

Bringing it all together - XML Tutorial

From the course: XML Essential Training (2018)

Start my 1-month free trial

Bringing it all together

- [Instructor] I'm going to wrap up this chapter by showing you a practical example, built using the DOM APIs that we have looked at so far to implement a cafe menu where a user can take a look at prices of items on a menu, and figure out what their bill will be before they ever come over and eat with us. So let's bring up JoesCafe.html in the Browser. So I'll go up to the system, and let's go ahead and bring this up in Firefox. All right, and so you can see that this is a menu of items for some fictional cafe. And if we scroll down, you can see that there are some controls down here for calculating a bill, and here's our text box, I've got a checkbox here for highlighting vegetarian meals. So what I can do is check some checkboxes over here in the Select column. And you can see that each item has a price associated with it. And when I click on the Calculate Bill button, it adds up all the items that I checked and shows me what the bill is going to be. I can also click the checkbox…

Contents