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:
||(tag (@ (attr1 "value1") (attr2 "value2")) (nested "Text node") (empty))|
The following two observation can be drawn from the above example:
- Textual notations for XML and SXML are much alike; informally, SXML textually differs from XML in relying on round brackets instead of angular braces.
- 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.
Other articles related to "sxml":
... Of course SXML can be parsed by a program in any programming language, and then be represented using any desired data structure ... a gross oversimplification ( 1 + 2 ) * ( 3 + 4 ) Because SXML is so similar to S-expressions syntactically, it is trivial to load it into a LISP or Scheme program ... Similarly, in any programming language it is trivial to load an entire SXML document into one long string—but it would be a poor choice for most purposes ...
... A powerful, yet unobtrusive SXML-based extension to HTML mostly oriented toward flow control ... Solid support for using standard J2EE view components such as JSP/Servlets in place of SXML ... Generation of Graphviz graphs through an SXML version of DOTML ...