Simple XML

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Simple XML is a variation of XML containing only elements. All attributes are converted into elements. Not having attributes or other xml elements such as the XML declaration / DTDs allows the use of simple and fast parsers. This format is also compatible with mainstream XML parsers.


For example:


would represent:

  <?xml version="1.0" encoding="UTF-8"?>
  <Agenda type="gardening">
    <Activity type="Watering">
      <golf-course time="6:00"/>
      <yard time="7:00"/>
    <Activity type="cooking">
      <lunch time="12:00"/>


Simple XML uses a simple XPath list for validation. The XML snippet above for example, would be represented by:


or a bit more human readable as:


This allows the XML to be processed as a stream (without creating an object model in memory) with fast validation.