Question?

Don’t see the answer you’re looking for? Send me your question.

Contact me
Peachpit Press offers other Visual QuickStart Guides for new developers.

  • HTML, XHTML, and CSS
  • PHP 6 and MySQL 5 for Dynamic Web Sites
  • Photoshop CS3
Visit PeachPit Press

Q & A - Well-Formed XML


Q: In chapter 1, Writing XML, you point out that when nesting XML elements, each must be completely enclosed in another otherwise the XML document will not be considered well-formed. If an XML document is not well-formed, will it still work?

A: First, when saying that an XML document is well-formed, it means that it conforms to the rules of XML syntax. So the answer to your question is no; an XML document that is not well-formed, will not work, and will not be read by an XML parser. Interestingly, while there are similar rules for HTML, browsers are much more forgiving than XML parsers, and will always try to display an HTML file even if it is not well-formed.

 

Back to the Q & A page




© 2010 Kevin Howard Goldberg