XML Tutorial : Introduction to XML

XML stands for EXtensible Markup Language

XML Document below :
<NUM> PO-1234 </NUM>
<PRICE> 138 </PRICE>

Components of an XML Document :


  1. Each element has a beginning and ending tag . <TAG_NAME>…</TAG_NAME>
  2. Elements can be empty (<TAG_NAME />)


  1. Describes an element; e.g. data type, data range, etc.
  2. Can only appear on beginning tag
Processing instructions
  1. Encoding specification (Unicode by default)
  2. Namespace declaration
  3. Schema declaration

Rules of Well Formed XML

  1. XML is case-sensitive
  2. There must be one, and only one, root element
  3. Sub-elements must be properly nested
  4. A tag must end within the tag in which it was started
  5. Attributes are optional
  6. Defined by an optional schema
  7. Attribute values must be enclosed in “” or ‘’
  8. Processing instructions are optional

Leave a Reply