Liking cljdoc? Tell your friends :D

clojure.contrib.prxml

Compact syntax for generating XML. See the documentation of "prxml" for details.

Compact syntax for generating XML. See the documentation of "prxml"
for details.
raw docstring

*html-compatible*clj

If true, empty tags will have a space before the closing />

If true, empty tags will have a space before the closing />
sourceraw docstring

*prxml-indent*clj

The number of spaces to indent sub-tags. nil for no indent and no extra line-breaks.

The number of spaces to indent sub-tags.  nil for no indent
and no extra line-breaks.
sourceraw docstring

as-strclj

(as-str x)
source

named?clj

(named? x)
source

prxmlclj

(prxml & args)

Print XML to out. Vectors become XML tags: the first item is the tag name; optional second item is a map of attributes.

Sequences are processed recursively, so you can use map and other sequence functions inside prxml.

(prxml [:p {:class "greet"} [:i "Ladies & gentlemen"]]) ; => <p class="greet"><i>Ladies & gentlemen</i></p>

PSEUDO-TAGS: some keywords have special meaning:

:raw! do not XML-escape contents :comment! create an XML comment :decl! create an XML declaration, with attributes :cdata! create a CDATA section :doctype! create a DOCTYPE!

(prxml [:p [:raw! "<i>here & gone</i>"]]) ; => <p><i>here & gone</i></p>

(prxml [:decl! {:version "1.1"}]) ; => <?xml version="1.1" encoding="UTF-8"?>

Print XML to *out*.  Vectors become XML tags: the first item is the
tag name; optional second item is a map of attributes.

Sequences are processed recursively, so you can use map and other
sequence functions inside prxml.

  (prxml [:p {:class "greet"} [:i "Ladies & gentlemen"]])
  ; => <p class="greet"><i>Ladies &amp; gentlemen</i></p>

PSEUDO-TAGS: some keywords have special meaning:

  :raw!      do not XML-escape contents
  :comment!  create an XML comment
  :decl!     create an XML declaration, with attributes
  :cdata!    create a CDATA section
  :doctype!  create a DOCTYPE!

  (prxml [:p [:raw! "<i>here & gone</i>"]])
  ; => <p><i>here & gone</i></p>

  (prxml [:decl! {:version "1.1"}])
  ; => <?xml version="1.1" encoding="UTF-8"?>
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close