What is XML?

Post Reply
KBleivik
Site Admin
Posts: 88
Joined: Tue Jan 31, 2006 3:10 pm
Location: Moss Norway
Contact:

What is XML?

Post by KBleivik »

XML or extensible markup language is a meta language. In XML you can design your own language. HTML is a presentation language, whereas XML is a data description language that lets you separate information from presentation. A XML document is almost self documentary and are readable by both humans and software. A XML document must validate. Those who know HTML, also know that the browser can render a document that does not validate, e.g. open or wrongly nested tags. That will give errors in a XML document. Essentially a XML document is a hierarchical data tree consisting of elements, tags and nodes. If a tag is open, the data structure is incomplete, and that is why you get an error. Validation and well-formedness is therefore very important for XML documents. So there are two levels of legality in XML, well-formedness and validity. A well-formed XML document must contain a single root element that contain all other elements, all elements must be properly nested and closed and all attributes must be quoted.

A valid XML document is a document that adheres to its Document Type Definition (DTD).

Links: Reccomeded books:
Good introduction that also explain how to build an XML powered content management system including a site search function and an XML sitemap. The code follows with the book.

Thomas Myer (latest edition): "No Nonsense XML Web Development With PHP"

Robert Rchards (latest edition): "Pro PHP XML and Web Services" from Apress

Note: Richards is a PHP insider, so this book is excellent on PHP XML parsers. He has written XMLreader and XML writer. In addtion the book has a very good chapter on XML security and XML canonicalization.
Kjell Gunnar Bleivik
Make it simple, as simple as possible but no simpler: | DigitalPunkt.no |

Post Reply