XML
From Saferpedia
XML - Extensible Markup Language is a set of rules to encode electronic documents. This is defined in XML 1.0 specifications produced by W3C.
XML's goals are simplicity, generality and usability on the Internet using a textual data format with a strong support via Unicode for all languages.
Contents |
Terminology
This section provides an introduction to the constructs most often encountered in day-to-day use of XML.
Unicode character
An XML document is a string of characters. Almost every legal Unicode character may appear in an XML document.
Processor and Application
The 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.
Markup and Content
The characters which compose 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.
Tag
Is a markup construct that begins with "<" and ends with ">". Tags come in three forms: start-tags, for example <section>, end-tags, for example </section>, and empty-element tags, for example <line-break/>.
Element
Is a 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/>.
Attribute A 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: <img src="madonna.jpg" alt='by Raphael'/>. Another example would be <step number="3">Connect A to B.</step> where the name of the attribute is "number" and the value is "3".
XML Declaration
XML documents may begin by declaring some information about themselves, as in the following example.
<?xml version="1.0" encoding="UTF-8" ?>
Example
Here is a small, complete XML document, which uses all of these constructs and concepts:
<?xml version="1.0" encoding="UTF-8" ?>
<painting>
<img src="madonna.jpg" alt='Foligno Madonna, by Raphael'/>
This is Raphael's "Foligno" Madonna, painted in
<date>1511</date>–<date>1512</date>.
</painting>
There are five elements in this example document: painting, img, caption, and two dates. The date elements are children of caption, which is a child of the root element painting. img has two attributes, src and alt.
- Source of Terminology and examples: Wikipedia.
This term is in development.
Contribute on developing this term.




