XML.HTMLTeacher.Com
[Search] [Contact] [Sitemap]
XML
[Main]
[XML]
[Valid and Well Formed XML]
[Classes]
[XHTML]
[XML]
[CSS]
[Design]
[Programming]
[Marketing]

* Writing a well-formed XML document is NOT the same as having a valid XML document. You can have a well-formed document that is not valid and a valid document that is not well formed although in the latter case, usually a document that is not well formed will not validate.

* To learn guidelines to create a well formed XML document, please see Creation Guidelines

What is Valid XML?

* Valid XML is simply an XML document that adheres to a DTD or schema and has been validated because it conforms to the restrictions and guidelines as stated by the DTD or schema.

Why Create Well Formed XML?

* Documents that are not well formed can cause problems. Browsers are a good example because they accept HTML markup that is not well formed. Internet Explorer will display a <table> in its entirety even if a closing </td> or </table> element has not been stated. Netscape will NOT display this same <table> if any of these ending tags are omitted, which is the the correct way to parse HTML/XHTML markup.

* These display problems occur most often when a web document has been marked up for only one specific browser. Browser developers continue to expand upon HTML by by-passing the standards and adding their own elements; usually gee-whiz type elements such as the <blink> and <marquee> elements. More recently, Internet Explorer, has incorporated support for many CSS properties not currently stated in the CSS specifications, such as being able to change the color of the browser's scrollbar.

* Due to a lack of standard adherence by browser vendors, severe compatibility and display problems as well as overall bloating of a browser's programming code to include these markup errors is the result. That is why XML has imposed strict guidelines in the creation of documents. If an XML document does not contain, for example, a closing tag to an element, then the parser will return an error and not display the document.

* XML strict guidelines allows for smaller programming code for the application and develops a standard by which all applications parsing XML must adhere to. This restricts the need for all parsers, browsers, for example, to continue to keep up with other browser's programming code and lends itself to tighter integration and compatibility. (Also the extensible nature of XML does away with compatibility problems.)

Well Formed XHTML

* XHTML also has strict guidelines in the creation of a web document. It allows for HTML predefined tags, but insists that the document be well formed in terms of adding closing tags, quoting attribute values and using lower case for tag names, among others. (Please see Writing Markup for further information.)

* When using XHTML guidelines to create a document for the web, you are adhering to the constraints imposed by XML and are therefore, in effect bridging the gap between HTML and XML by creating this well formed document.


All materials, tutorials and content are copyrighted by HTMLTeacher.Com.
Any use of any material, tutorials and/or content provided by this site is prohibited without expressed written consent of the author.

Copyright ©2003 HTMLTeacher.Com and Sonia Weimann