Share this Page URL
Help

Chapter 37. Toward XML > Defining the XML Document as a Whole - Pg. 700

Toward XML <br></br> 700 Unfortunately it's too dangerous to use safely. Many current and most legacy browsers don't recognize the non-HTML closing tag and do odd things with it. Navigator 4.7, for example, might trash the display when it stumbles across a closing break tag. The exact behavior might vary by position in the code and the exact empty tag being closed. In short, it's error prone and should be avoided. · XML requires the use of either single or double quotes around attribute values--Where HTML is lax about numbers especially and almost anything without included spaces, XML treats everything as character strings and lets the application figure everything out. · XML supports multiple languages--It doesn't really support the extended character sets used in many European languages by default, as does HTML. There's an easy mechanism for in- cluding these, as well as the entire Unicode (also known as ISO/IEC 10646) character set of more than a million characters, so support for Chinese, Arabic, and many of the more exotic languages of the world is a piece of cake. Other than the differences noted in this list, XML is very similar to HTML in the way tags are marked, attributes are argued, and content is placed between tag pairs. If you write clean HTML, the conversion of your HTML to XML-based XHTML is so trivial that it's possible to let a machine do it for you. Of course, XML is not limited to languages that look like HTML, so your document structure is limited only by the necessary tree structure and by your own imagination. For Windows machines, it's hard to beat the power and functionality of the HTML-Kit pro- gram from Chami.com (http://www.chami.com/), which uses Dave Raggett's excellent Tidy program to clean up and optionally convert your code to clean XML. It inserts all those pesky closing tags and the special EMPTY closing tag syntax, tweaks tags that don't nest Tip from