Attributes Entitites   «Prev  Next»

Existing XML Parsers - Exercise

Survey of existing parsers and their uses

On your own: Parsing Documents in a browser

Objective: Parse an XML file using

Scoring

This exercise is not scored. It's an opportunity for you to practice parsing documents in a browser. When you're finished, click the OK, I'm Done button.

Download files

We have supplied the file for this exercise (invent2.xml) in the 05-06 folder of the course download available from the Resources page.

Instructions

Start with the file invent2.xml, which can be found in the 05-06 folder of the course download. Open this file in IE 5.x. If a file is both well-formed and valid, you will see the fully tagged document with clickable Plus and Minus buttons that allow you to expand and collapse the elements.
XML file in a browser
XML file in a browser

If a document is not well-formed or not valid, IE 5.x will give you information pertaining to the error and will not show the page until all the error have been corrected.
Make any necessary corrections to the source code. To practice your own XML skills, don't try and open this file in the browser until you have looked at it carefully and corrected all the bugs you can find. When you believe your file is both valid and well-formed, open it in the browser. If you missed a bug, IE 5.x will let you know!