项目作者: akarpovskii

项目描述 :
ANother S-Expression Markup Language
高级语言: Clojure
项目地址: git://github.com/akarpovskii/anseml.git
创建时间: 2019-11-30T12:49:44Z
项目社区:https://github.com/akarpovskii/anseml

开源协议:MIT License

下载


" class="reference-link">anseml

ANSEML is ANother S-Expression Markup Language inspired by XML format.

The library provides a simple API to work with documents and a tool to convert the document to HTML format.

The document format is pretty straightforward.

  • Each ANSEML document has exactly one single root element, which encloses all the other elements.
  • Each element may or may not have a set of attributes.

More specifically, the format is following:

  1. (:tag-name
  2. attr-map?
  3. body)

Where attr-map? is an associative array of { key value } pairs,
where key is keyword and value is one of the following primitives: string, integer, float; and body contains zero or more primitives or enclosed elements.

Here are few examples:

  1. (:root
  2. { :id "Root" }
  3. "Here is a number:" 123
  4. "And here is the text:"
  5. (:text
  6. "Some text")
  7. :br
  8. (:text
  9. "Another text"))

Note that you don’t need to put parenthesis around the element consisting only of a tag-name.