8.5 CHARACTERISTICS
  • An XML document should be well formed, with a root element.
  • XML tags are case sensitive.
  • Many times, attributes can be substituted by elements and is in fact a good practice to follow. The thumb rule is that whenever metadata is to be represented, choose attribute instead of element. Examples of metadata include ID, type information, path etc., though it is dependent on the semantics. The majority of the representation is data (or properties) for which element is chosen over attribute.
  • XML is extensible.
  • An XML document's format can be extended without causing existing format to crash. For example, if elements are added to an existing XML structure, parsing will still work off the old elements and go ahead with (existing) ...

Get Web Technology: Theory and Practice now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.