DEVFYI - Developer Resource - FYI

Differences between XML and HTML

XHTML Interview Questions and Answers


(Continued from previous question...)

3. Differences between XML and HTML

Since XML and HTML are derived from SGML they are similar, but have the following differences:
1. XML is case-sensitive
2. XML must have quotes (single or double) around attributes
3. Most interpreters of HTML are very forgiving about missing end tags - XML parses are not.
4. Comments start with <-- and end with -->. Inside a comment, "--" may not appear. Although this is fine in html, it confuses xml parsers.

(Continued on next question...)

Other Interview Questions