XML Data Format

XML data format conforms to the rules of the XML language 1.0 specification, as published by the worldwide Web Consortium (W3C). The format includes elements, content particles, pcdata, and attributes.

There are two types of XML data:

  • Valid - A document type definition (DTD) or schema must be used and applied against the data to have a valid XML document.
  • Well-formed - The document is not validated against a DTD or schema and only needs to follow basic XML structure rules.

DTDs and schemas are sets of rules that apply to valid data.

  • DTDs are rules created in text using any text editor.
  • Schemas are sets of rules created using a schema language.

XML Predefined Entity References

XML comes with the following predefined references:

  • &
  • &
  • <
  • <
  • &gt;
  • >
  • &quot;
  • &apos;

These are used when you have to place any of the reserved characters in your data.

Example: AT&T would be written AT&amp;T.