SXML

SXML is an alternative syntax for writing XML data, using the form of S-expressions. It is also a set of implementations that provide typical XML-processing functionalities that operate on the SXML syntax.

Textual correspondence between SXML and XML for a sample XML snippet is shown below:

XML SXML
Text node (tag (@ (attr1 "value1") (attr2 "value2")) (nested "Text node") (empty))

The following two observation can be drawn from the above example:

  1. Textual notations for XML and SXML are much alike; informally, SXML textually differs from XML in relying on round brackets instead of angular braces.
  2. Additionally, SXML is not only a straightforward textual notation for XML data, but also has a directly-corresponding primary data structure for the LISP family of functional programming languages, thus providing an illustrative approach for processing XML data with a general-purpose programming language.

Similarity between XML and S-expressions reified in SXML allows achieving close integration between XML data and programming language expressions, resulting in illustrativeness and simplicity of XML data processing for an application programmer.

The structural similarity of S-expression-like and XML-like syntaxes has often been discussed in the XML community, going at least as far back as 1993.

Read more about SXML:  Motivation, XML, XML Information Set and SXML, SXML Specification, SXML Features