HTML in an XML World

As part of the widespread adoption of well-known Internet technologies, there are still a few places where historical artifacts continue to hinder the development tasks of designers and developers. One of these is HTML. In a perfect world, HTML would simply be another XML language. But it isn't. Because real-world HTML often violates the requirements of a well-formed XML document, browser parsers are expressly written to handle the idiosyncrasies of HTML markup.

To be fair, HTML was derived from the SGML world for the purpose of addressing the needs of browsers in the World Wide Web. The development of the DOM was inspired to first address representative HTML documents. XML came along later, with its new notion for defining ...

Get Enhydra XMLC™ Java™ Presentation Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.