Browse files

Updated readme to include S-expression comment/cdata example

  • Loading branch information...
1 parent 71ed615 commit 8c74d87287ffd46c649203d439386f429a77b135 @senior senior committed Dec 31, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0
@@ -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"}

0 comments on commit 8c74d87

Please sign in to comment.