- XML Elements
- Generic Identifiers
- Some Rules for Naming Elements
- Storing the Data in XML
- Parsed Character Data
- Bypassing Parsing with CDATA
- When to Use Attributes
- Classifying Attributes: Attribute Types
- Attribute Rules
- Well-Formedness Rules
- Creating a Well-Formed XML Document
- The Basics of Validation
- How Do Applications Use XML?
- An Overview of XML Tools
- Additional Resources
All specifications are concerned with semantics, and XML is no exception. In the case of elements, the semantic game is played with the terms we use to refer to elements within a document.
As we mentioned before, an element is actually the entire instance in an XML document, including the start tag, content, and end tag. However, we refer to elements by the moniker in the tag, or the element type. For example:
Here, the element is the <name> tag, followed by the Stella Ryan name, and the </name> tag. This is the element instance. The element type in this case is name, which is also called the generic identifier. This is how elements are commonly referenced. For example, in talking about this element, we would simply refer to it as the name element.