XML Anatomy
Introduction
This post presents a brief description of the parts that make up an XML file.
The Parts of An XML Document
The first line containing the opening xml statement marks where the xml document entries begin. The version declares the version of XML to which the document should be evaluated while the encoding assignment identifies the standardized character set that is being used to write the markup and content of the XML. Following this are the opening and closing element tags, attribute names and their associated values.
The structure consists of elements, attributes, and entities. Element names can be any mixture of characters, with a few exceptions. Element names are case sensitive, unlike HTML.
Attributes can be present within elements and parsing them out often requires different processing strategies. The value of the attributes will always be contained in quotes and they can be either single or double quotes.
XML documents can be created by plain text editors. There are numerous free and open source XML editors available. Noteworthy is Cooktop. It allows for the creation of XML, DTD and XSLT documents, as well as using XPATH. Cooktop differentiates by color the code for XML and DTD documents. In addition, Cooktop provides numerous tools to help in the creation and modification of those documents, such as a DTD extractor to generate a DTD based on a sample XML document, an HTML to XSL converter, and more. For a list of other XML editors see this link.
Leave a Reply
You must be logged in to post a comment.