From the course: XML Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Building a schema for a business card - XML Tutorial
From the course: XML Essential Training
Building a schema for a business card
- [Instructor] Now we're going to us XML schema to define a schema file for our business card example. So let's open up the business card XML file and let's also open up the businesscard_start.xsd file. I've also included a finished version of the schema file in case you want to just jump ahead and try it out. So let's go back to the XML file and you can see here, the XML file, this is the business card that we've been using up until now and let's start by writing the definition for the business card over in our schema file. So I'll begin by writing the definition for the business card and of course it's going to be an element. So I'll start with xsd element. And the name is going to be business card. That's our root tag. Alright, and it's going to be a complex type. So I'll put a complex type in here. So inside the complex type we're going to define a sequence because our business card is a sequence of tags. So there's a name tag followed by one or more phone tags followed by an…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.