Terms
October 7th, 2010A listing of key terminology and examples taken from the Wikipedia “XML” article. See the XML 1.0 (Fifth Edition) Specification for other, more specific instances.(Unicode) CharacterBy definition, an XML document is a string of characters. Almost every legal Unicode character may appear in an XML document.Processor and ApplicationThe processor analyzes the markup and passes structured information to an application. The specification places requirements on what an XML processor must do and not do, but the application is outside its scope. The processor (as the specification calls it) is often referred to colloquially as an XML parser.Markup and ContentThe characters which make up an XML document are divided into markup and content. Markup and content may be distinguished by the application of simple syntactic rules. All strings which constitute markup either begin with the character “<” and end with a “>”, or begin with the character “&” and end with a “;”. Strings of characters which are not markup are content.TagA markup construct that begins with “<” and ends with “>”. Tags come in three flavors: start-tags, for example <section>, end-tags, for example </section>, and empty-element tags, for example <line-break/>.ElementA logical component of a document which either begins with a start-tag and ends with a matching end-tag, or consists only of an empty-element tag. The characters between the start- and end-tags, if any, are the element’s content, and may contain markup, including other elements, which are called child elements. An example of an element is <Greeting>Hello,world.</Greeting> (see hello world). Another is <line-break/>.AttributeA markup construct consisting of a name/value pair that exists within a start-tag or empty-element tag. In the example (below) the element img has two attributes, src and alt: <imgsrc”madonna.jpg”alt’byRaphael’/>. Another example would be <stepnumber”3″>ConnectAtoB.</step> where the name of the attribute is “number” and the value is “3″.XML DeclarationXML documents may begin by declaring some information about themselves, as in the following example.<?xml version”1.0″ encoding”UTF-8″ ?>