CSE691/891 - Internet Programming Summer 2001
prev next

XML Syntax Rules

The body of an XML document is a tree of element nodes with a single root. Each element node is a tagged structure of Unicode characters.
  1. element syntax is:
    <tagName *[attributeName="value"]> element body </tagName>
    TagNames are user defined (with two exceptions we will discuss later), as are attributes.
  2. Unlike HTML, tagNames and attributes are case sensitive.
  3. XML names are composed of Unicode characters.

  4. Element bodies contain character data.

    To pass binary data, you must convert it to a character representation. Converting to hexadecimal representation is easy, but doubles memory required to hold the data. The Simple Object Acess Protocol (SOAP) parser uses a conversion scheme that expands binary data by about 30%.
  5. A well-formed XML document has:

    1. prev next