XML text <-> element tree, written by hand over strings.
Node shape: {:tag string :attrs [[name value] ...] :content [node-or-string ...]}. Attribute order is a vector so emission is byte-deterministic on every host.
emit : node -> string (declaration, one-space indent, trailing newline).
parse: string -> {:ok node} | {:error :mlt/xml-malformed :at int :message string}.
Portable: clojure.core and clojure.string only, no reader conditionals.
XML text <-> element tree, written by hand over strings.
Node shape: {:tag string :attrs [[name value] ...] :content [node-or-string ...]}.
Attribute order is a vector so emission is byte-deterministic on every host.
`emit` : node -> string (declaration, one-space indent, trailing newline).
`parse`: string -> {:ok node} | {:error :mlt/xml-malformed :at int :message string}.
Portable: clojure.core and clojure.string only, no reader conditionals.(attr node k)Value of attribute k on node, or nil.
Value of attribute `k` on `node`, or nil.
(children node)(children node tag)Element children of node with tag tag (all element children when tag is nil).
Element children of `node` with tag `tag` (all element children when tag is nil).
(element tag attrs & content)Build a node. attrs is a vector of [name value] pairs; nil values are dropped.
Build a node. `attrs` is a vector of [name value] pairs; nil values are dropped.
(emit node)Serialize a node tree to an XML document string.
Serialize a node tree to an XML document string.
(parse s)Parse an XML document string into a node tree.
Parse an XML document string into a node tree.
(text node)Concatenated text content of node.
Concatenated text content of `node`.
(unescape s)Decode XML entities in s. An unknown or unterminated entity is kept verbatim.
Decode XML entities in `s`. An unknown or unterminated entity is kept verbatim.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |