Encyclopedia of Database Systems

2018 Edition
| Editors: Ling Liu, M. Tamer Özsu

XML Attribute

  • Michael RysEmail author
Reference work entry
DOI: https://doi.org/10.1007/978-1-4614-8265-9_796


XML attribute; XML attribute node


An XML attribute is used to represent additional information on an XML element in the W3C XML recommendation [2].

Key Points

The name of an XML attribute has to be unique for a given element. Therefore, the following XML element is not allowed

<e a1 = “v1” a1 = “v2”/>while the following is well-formed

<e1 a1 = “v1”> <e2 a1 = “v2”/> </e1>

An XML attribute has a value that follows the attribute value normalization rules outlined in Sec. 3.3.3 of [2]. This means that several whitespace characters do not get preserved in attribute values, unless they are explicitly represented with a character entity (e.g., for carriage return).

Attributes can be constrained and typed by schema languages such as XML DTDs [2] or XML Schema [3].

An XML attribute is represented as an XML attribute information item in the XML Information Set [1] and an XML attribute node in the XPath and XQuery data model [4].


This is a preview of subscription content, log in to check access.

Recommended Reading

  1. 1.
    XML 1.0 Information Set, latest edition available online at: http://www.w3.org/TR/xml-infoset.
  2. 2.
    XML 1.0 Recommendation, latest edition available online at: http://www.w3.org/TR/xml.
  3. 3.
    XML Schema Part 0: Primer, latest edition available online at: http://www.w3.org/TR/xmlschema-0/.
  4. 4.
    XQuery 1.0 and XPath 2.0 Data Model (XDM), latest edition available online at: http://www.w3.org/TR/xpath-datamodel/.

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2018

Authors and Affiliations

  1. 1.Microsoft CorporationSammamishUSA

Section editors and affiliations

  • Sihem Amer-Yahia
    • 1
  1. 1.Laboratoire d'Informatique de GrenobleCNRS and LIGGrenobleFrance