From the course: XML Essential Training

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Solution: BusinessCard XML to HTML

Solution: BusinessCard XML to HTML

From the course: XML Essential Training

Solution: BusinessCard XML to HTML

(upbeat ambient music) - All right, let's review my code for this challenge. So we needed to load the XML for this set of business cards and then build HTML to represent each one. So if we scroll down to my code, right? Remember we needed to fill out the create biz cards function. So my code starts by using the load XML doc to load XML file, right? Which is the starting point code that I gave you, okay? We already have this function here, load XML doc, and in create card elements, I simply call load XML doc, and I use my then handler to call a function that I've created called create biz cards. So let's take a look at create biz cards to see what it does. So this function takes the XML document and builds each TML section one at a time. So I use the get elements by tag name function to get the list of business card elements in the XML. In previous examples in the chapter, there were only one of these, but now there's multiple ones, right? So I think there's four total. And so I have…

Contents