Monday, July 4, 2011

HTML SYNTAX

XML Syntax

Well-formedness

The W3C specifies that all XML documents must be well-formed. Specifically, a textual object is a well-formed XML document if:

* Taken as a whole, it matches the production labeled document
* It meets all the well-formedness constraints given the XML specification
* Each of the parsed entities which is referenced directly or indirectly within the document is well-formed

If this all sounds confusing, don't worry too much. Basically, all you need to do is ensure you build your XML applications correctly!

XML Declaration

If you include an XML declaration, it must be the first item in your document. The XML declaration uses the element.

Example:


<*?xml version="1.0" encoding="UTF-8" standalone="no"?*>

PLEASE Remove Firstly All Asterics *



One Root Element Only

Each XML document must have one root element and no more. All other elements must be contained within the root element.

Example:


<*root>
<*child>Data<*/child>
<*child>More Data<*/child>
<*/root>

PLEASE Remove Firstly All Asterics *



XML Markup

Generally speaking, an XML document consists of markup and data. Markup is provided in the form of tags and attributes. Data is the text that goes in between the tags or is provided within their attributes.

The next couple of lessons cover the key syntax rules related to elements and attributes.

THANK YOU