Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated readme to include S-expression comment/cdata example

  • Loading branch information...
commit 8c74d87287ffd46c649203d439386f429a77b135 1 parent 71ed615
@senior senior authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 README.md
View
7 README.md
@@ -97,6 +97,13 @@ The same can also be expressed using a more Hiccup-like style of defining the el
[:baz {} "The baz value"]]]))
;;-> true
+Comments and CData can also be emitted as an S-expression with the special tag names :-cdata and :-comment:
+
+ (= (element :tag {:attr "value"}
+ (element :body {} (cdata "not parsed <stuff")))
+ (sexp-as-element [:tag {:attr "value"} [:body {} [:-cdata "not parsed <stuff"]]]
+ ;;-> true
+
XML can be "round tripped" through the library:
(let [tags (element :foo {:foo-attr "foo value"}
Please sign in to comment.
Something went wrong with that request. Please try again.