|
Overview of XML |
An XML document is a highly structured file that contains both data and markup. Data can be anything from simple text to pictures. Markup describes the relationship between each data item.
XML is growing in acceptance within the software development industry as it offers a platform independent and highly structured way to represent data and the relationship between that data. For example, almost all of the source file formats used by Microsoft in their .NET platform are XML based documents.
What does an XML document look like?
In it’s purest and most simplistic form an XML document looks like :-
<?xml version="1.0"?> |
|
The data in this document is in blue. The markup is everything else surrounded by < > symbols.
The document begins with a processing instruction: <?xml ...?>. This is the XML declaration. While it is not required, its presence explicitly identifies the document as an XML document and indicates the version of XML to which it was authored.
Empty elements (<helpcontext/> in this example) have a modified syntax. While most elements in a document are wrappers around some content, empty elements are simply markers where something occurs (a horizontal rule for HTML's <hr> tag, for example, or a cross reference <xref> tag). The trailing /> in the modified syntax indicates to a program processing the XML document that the element is empty and no matching end-tag should be sought.
XML document s are often referred to a being well-formed. A document is said to be well-formed if it obeys all aspects of the XML specification. This means for every start-tag (<book>) there should be a corresponding end-tag (</book>).
If a file is not well formed ezParse will display an appropriate syntax error as you attempt to load the file. To continue loading the file, you’ll need to address and fix any errors in your XML documents.