XML Basics
9.0D
Extensible Markup Language (XML) is a standard for encoding data. XML allows you to apply markup, in the form of tags, to data. A basic XML starting tag is a string of text enclosed using the < and > characters. This string of text is known as the tag name. Tag names are case-sensitive and must start with letters, or an underscore. The rest of the tag name can contain letters, digits, hyphens, underscores, and periods.
A basic XML ending tag is a string of text with a leading / character that is enclosed using the < and > characters.
A matching pair of XML starting and ending tags constitutes an XML element. The name of the element is the tag name of the enclosing tags.
XML elements identify named sections of data, and may contain other XML elements, XML attributes, or text.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Relationships between XML elements are described in the terms of child and parent elements. Every XML document must start with a single document or root XML element that is the parent of all other XML elements.
XML attributes allow the addition of information about an XML element using name=value pairs. XML attributes are placed in the starting tag of the element, following the tag name. XML attributes are separated from the tag and each other by using a leading space character. The value of an XML attribute is enclosed in either single or double quotes.
|
|
|
|
|
|
|
|
|
XML elements can contain both XML attributes and text at the same time.
See Also: XML Support
![]() |