XML for Web Developers – Parity Training Course

Last week I attended an ‘XML for Web Developers’course in Holborn. After being booked on this course by my line manager, I decided to brush up on my HTML skills and prepare fully to ensure that I got the most out of the course. After tasks such as completely re-coding parts of the University of Hertfordshire HR website including the additions of CSS I then felt confident.

XML was an area that I had a slight understanding of. What is it for? Why is it used? These are some of the questions that I tried to have answered before attending the course, but unfortunately I did not feel I was able to answer these questions with confidence, so I was hopeful that all would become clearer during the course.

Once I took my seat the course instructors first words were, ‘I shall start by explaining exactly what XML is and why it is used’, :-)

Introduction
XML (eXtensible Markup Language) is fast becoming the building block of many high profile e-commerce websites. XML compliments the formatting abilities provided with HTML as HTML was designed purely as a formatting tool. XML is also able to store data, the XML can then manipulate the data and present it just as a normal database would. XML is the addition of tags that surround sections of data, it was created by the World Wide Web Consortium (W3C) in order to overcome the limitations that HTML has. An example of XML is seen in RSS, this is very small part of XML. XML is an open standard characterised by a set of grammatical rules and not an application. XML is also able to create application interfaces – this is an area that was briefly covered as all attendees of the course preferred to concentrate on other areas that they felt were more important.

The main areas covered in the course were XML Parsers, DTD, Schema, DOM, SAX and XSL. I will briefly cover each of these areas.

XML Parsers
An XML file is read and written by a ‘parser’, a parser is a COM object, Java object. The parser is instantiated to create a document object. The XML file to process is loaded into the document object and the object exposes a standard API. The parsers used during the course was ‘Saxon’ and ‘Internet Explorer 6 (with a specific add-on)’. Both had their pros and cons but for all of the programmers that are confident in using MS-Dos then Saxon would be the better of the 2. We also used a program called XML Spy, this was another good parser with its own pros and cons with the biggest down fall being that it is an expensive product compared to the other 2 being free for download.

DTD (Data Type Definition)
A DTD is basically a check to see if the XML file follows all application level rules, it provides details about the structure, element relationships, attribute usage, data types, etc. An XML document that complies with the rules of the DTD is known as a ‘valid’ document.

Schema
XML Schema’s are a newer alternative for the DTD syntax. They are better able to describe the structure and content of XML documents, have full data-type support and can define re-usable, complex content models.

DOM (Document Object Modelling)
A class hierarchy exists within the DOM. It allows programs and scripts to dynamically access and update content, style and structure of documents.

SAX (Simple API for XML Parser)
DOM parsers can have a high processing and memory overhead and for large documents an alternative type of parser can be used which is the SAX. SAX is event driven, application traps events and methods have to be written to handle each event.

XSL (eXtensible Style sheet Language)
XSL has 2 components – XSLT and formatting objects.

XSLT defines a set of instructions for transforming an XML document and formatting objects provide tags to control document rendering e.g. CSS (Cascading Style Sheet).

XSLT allows XML data restructuring without scripting or programming, it is a non-procedural and a declarative language. It is a valid XML document called a style sheet (not to be confused with a ‘Cascading Style Sheet’), it allows separation between content and presentation.

Conclusion
To conclude I found this course enjoyable and well worth the time and money. All the staff within the Parity Training centre were very helpful and friendly. The course loaction was easily accessible as I used the tube and did not have to change lines as I was already on the ‘Picadilly’ line. So for anyone looking to get into XML I would most definitely recommend this course, it is quite intense and very practical oriented (which I thought was great, who wants to just listen to the instructor). The instructor stated at the beginning that if we had no HTML experience then that is okay, but I would like to say that having HTML experience is a huge advantage, also if any scripting languages are known it would also help. I am glad to have been able to take part in the course and would like to thank my Line Manager – Roger Kondrat.

References
This post was created with the assistance of the ‘Parity Training’ course notes

Leave a Reply