![]() |
Home | Java | Palm OS | ASP COM | XML XSL | PHP | Personal | Your IP: 38.103.63.18 |
|
Tutorials: |
A simple XML Resume example If you have read the introduction to XML then lets look at how we can use XML to structure information about a resume. A well formed XML document has the following:
Some of things you should note before you proceed. This is not an exhaustive list, but nevertheless this will suffice for now.
Note: Do not mistake Document Type Declaration with Document Type Definition (DTD). A document type declaration is simply a declaration that this is a XML document and what version of XML you are using. A simple declaration with the bare essential attributes is like this - <?xml version="1.0" ?> Okay now lets dive straight into our first XML document. There is so much more information about the structure of an XML document, Document Type Declaration and Document Type Definitions, etc. I cannot cover all of that here as it would simply entail writing a whole book about it :) I have added comments wherever possible and hope they should suffice. So on we go.
How do we view the XML document? We now we have a simple standalone XML document. By standalone it means that there is no DTD associated with the document. It is a valid document as we have applied all the XML standards while creating it. But how do we view it in a browser. It is simple to read as it is well formatted, structured and in plain text. But if we wanted to format this information in nice tables and use fonts and colors, then how would we do that? We will look at searching through XML documents for particular data later on, but for now lets see how we can view this document in a browser window. An XML document cannot be simply rendered by a browser unless the browser is capable of parsing the document. If you have MS IE5.0 ® then you can view the contacts file in our example as a tree type list. A tree structure is like the MS Windows Explorer where you see the main hard drive and all directories and subdirectories within in a tree leaf and node format. Those who have a browser capable of parsing XML documents can download this file and view it locally. Once loaded, try clicking on the (+) plus and (-)minus signs and see how the resume information can be viewed as leaves and nodes. What you see here is that your browser has used its own internal XML parser to parse the XML document and present a HTML type view for you. Microsoft IE comes with a built in XML parser and is available on your local system as msmxl.dll under your system32 directory. But this is not that pretty and you really cannot do much with it. Except offcourse, you can look athe way it is structured and can use it as a feedback to modify some of it to better suit your needs.
|
| Home | Java | Palm OS | ASP COM | XML XSL | PHP | Personal | Contact |