From the course: XML Essential Training
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Challenge: BusinessCard XPath
From the course: XML Essential Training
Challenge: BusinessCard XPath
(upbeat music) - [Instructor] All right, it's time for another programming challenge. In this challenge, you're going to use XPath to build an HTML file that contains the XML data from our business card data set, which is very similar, in fact, it's the same, from chapter four when we learned how to use the document object model. So that's going to be this data set right here. For that earlier challenge, we built HTML to represent all of the business cards in the XML data set. Now this challenge is going to be slightly different. We're going to use the querying capabilities of XPath to selectively choose the XML data to put into the webpage. So I'm going to run my finished example so you can see what it looks like. So this is the completed solution. So I have two buttons in my webpage. One is labeled Create Primary Work cards, and one is called Create example.org cards. So when I click on the primary work cards button, you can see that only two cards appear in the HTML. And that's…