Library tutorials & articles
Extensible Markup Language (XML) Tutorial
Well Formed XML Documents
A well formed document ensures the tags do not overlap and has closing tags for each open tag.
Overlapping Tags
XML has a strict hierarchical syntax. Tags must be nested properly by closing all child elements before closing the parent elements. The following is an example of an overlapping tag in HTML.
An Incorrect HML Document with Overlapping Tags
<u><b>This is underlined and BOLD</u></b>
As the bold tag is started within the underline tag, it should be closed before the underline tag. Browsers are able to render the above line so that it displays correctly, but this would be illegal in XML as it doesn't adhere to the strict hierarchical syntax.
Corrected Example
<u><b>This is underlined and BOLD</b></u>
SGML doesn't require closing tags, but XML does to ensure the well-formedness of the document. Some HTML tags don't have closing tags. To adhere to the rules of XML, an XHTML document works around the problem by placing a '/' at the end of the tag.
<img src="images/logo.gif" alt="Logo" width="100" height="50" />
Case Sensitive
XML is case sensitive. XHTML, the XML version of HTML is defined in lowercase. All tags and attributes should be declared in lowercase.
Quotes
Attribute values should always be placed in single or double quotes, regardless of the data type, as in the following example.
<table border="0" cellpadding="0" cellspacing="0">
Related articles
Related discussion
-
vb6 generated help file not working in Window 7 and Vista
by Thushan Fernando (1 replies)
-
doctype in xml using c#.net
by madarapurajesh (0 replies)
-
Like statement in Xpath
by madarapurajesh (3 replies)
-
Problem looping through xml file to play a flv video file
by Bozmeister (0 replies)
-
Creating a Windows Service in VB.NET
by davidvanr (108 replies)
Related podcasts
-
LINQ to XML
Scott's been poking around with LINQ to XML and reports his findings to Carl about life with XDocuments and XElements. They also talk about the bridge classes that link (no pun intended) System.Xml and System.Xml.Linq.
Beutiful article. Takes a user from a beginner level to an intermediate level very nicely. Certainly a treat for beginers and an expert alike.
Good article for starters
This thread is for discussions of Extensible Markup Language (XML) Tutorial.