Programming‎ > ‎Language‎ > ‎



XML is a markup language with rules for encoding documents.

  • The xml document is made up of elements that can contain other elements.
  • The start element of an element is marked with a start-tag and the end with an end tag.
  • A start tag is a word that starts with a < and ends with a >. Ex <bold>, <duck> or <egg> are start tags.
  • A end tag is the same word but with a / at the start. Ex </bold>, </duck> or </egg> are the end tags.
  • Anything between a start and end tag is the elements content and it can be more elements that are then called the child elements.
  • If no content is needed for a element one can use a empty element tag. It takes the form <word />.
  • A element can also have attribute that are name and values that are inside the start ir empty tag. Ex <word size="25">.
  • The attribute name is a single word and the value is inside "".
  • A attribute can appear at most once in a element so for more then one value they need to be stored in the value text in some form. Common ways is to separate the values with , or space.
  • Comments start with <!-- and end with -->.
  • Comments can not be nested.