Liking cljdoc? Tell your friends :D

net.cgrand.enlive-html

enlive-html is a selector-based transformation and extraction engine.

enlive-html is a selector-based transformation and extraction engine.
raw docstring

*options*clj

source

add-classclj

(add-class & classes)

Adds the specified classes to the selected element.

Adds the specified classes to the selected element.
sourceraw docstring

afterclj

(after & values)

Inserts the values after the current selection (node or fragment).

Inserts the values after the current selection (node or fragment).
sourceraw docstring

alter-ns-options!clj

(alter-ns-options! f & args)

Sets the default options to use by all templates and snippets in the declaring ns.

Sets the default options to use by all templates and snippets in the
declaring ns.
sourceraw docstring

annotateclj

(annotate node)
source

anyclj

source

any-nodeclj

source

appendclj

(append & values)

Appends the values to the content of the selected element.

Appends the values to the content of the selected element.
sourceraw docstring

append!clj

(append! t)
(append! t a)
(append! t a b)
(append! t a b c)
(append! t a b c d)
(append! t a b c d e)
(append! t a b c d e f)
(append! t a b c d e f g)
(append! t a b c d e f g & more)
source

as-nodesclj

(as-nodes node-or-nodes)
source

atcljmacro

(at node-or-nodes & rules)
source

at*clj

(at* node-or-nodes rules)
source

attr-containsclj

Selector predicate, tests if the specified attributes contain the specified values. See CSS *= .

Selector predicate, tests if the specified attributes contain the specified values. See CSS *= .
sourceraw docstring

attr-endsclj

Selector predicate, tests if the specified attributes end with the specified values. See CSS $= .

Selector predicate, tests if the specified attributes end with the specified values. See CSS $= .
sourceraw docstring

attr-hasclj

(attr-has attr & values)

Selector predicate, tests if the specified whitespace-seperated attribute contains the specified values. See CSS ~=

Selector predicate, tests if the specified whitespace-seperated attribute contains the specified values. See CSS ~=
sourceraw docstring

attr-startsclj

Selector predicate, tests if the specified attributes start with the specified values. See CSS ^= .

Selector predicate, tests if the specified attributes start with the specified values. See CSS ^= .
sourceraw docstring

attr-valuesclj

(attr-values node attr)

Returns the whitespace-separated values of the specified attr as a set or nil.

Returns the whitespace-separated values of the specified attr as a set or nil.
sourceraw docstring

attr=clj

Selector predicate, tests if the specified attributes have the specified values.

Selector predicate, tests if the specified attributes have the specified values.
sourceraw docstring

attr?clj

(attr? & kws)

Selector predicate, tests if the specified attributes are present.

Selector predicate, tests if the specified attributes are present.
sourceraw docstring

attr|=clj

Selector predicate, tests if the specified attributes start with the specified values. See CSS |= .

Selector predicate, tests if the specified attributes start with the specified values. See CSS |= .
sourceraw docstring

beforeclj

(before & values)

Inserts the values before the current selection (node or fragment).

Inserts the values before the current selection (node or fragment).
sourceraw docstring

butclj

(but selector-step)

Selector predicate, matches elements which are rejected by the specified selector-step. See CSS :not

Selector predicate, matches elements which are rejected by the specified selector-step. See CSS :not
sourceraw docstring

but-nodeclj

(but-node selector-step)

Selector predicate, matches nodes which are rejected by the specified selector-step. See CSS :not

Selector predicate, matches nodes which are rejected by the specified selector-step. See CSS :not
sourceraw docstring

cacheableclj

(cacheable selector)
source

cacheable?clj

(cacheable? selector)
source

clone-forcljmacro

(clone-for comprehension & forms)
source

comment-nodeclj

source

contentclj

(content & values)

Replaces the content of the element. Values can be nodes or collection of nodes.

Replaces the content of the element. Values can be nodes or collection of nodes.
sourceraw docstring

defsnippetcljmacro

(defsnippet name source selector args & forms)

Define a named snippet -- equivalent to (def name (snippet source selector args ...)).

Define a named snippet -- equivalent to (def name (snippet source selector args ...)).
sourceraw docstring

defsnippetscljmacro

(defsnippets source & specs)
source

deftemplatecljmacro

(deftemplate name source args & forms)

Defines a template as a function that returns a seq of strings.

Defines a template as a function that returns a seq of strings.
sourceraw docstring

do->clj

(do-> & fns)

Chains (composes) several transformations. Applies functions from left to right.

Chains (composes) several transformations. Applies functions from left to right.
sourceraw docstring

emit*clj

(emit* node-or-nodes)
source

emit-tagclj

(emit-tag tag t)
source

evenclj

source

first-childclj

source

first-of-typeclj

source

flatmapclj

(flatmap f node-or-nodes)
source

flatten-nodes-collclj

(flatten-nodes-coll x)
source

fragment-selector?clj

(fragment-selector? selector)
source

get-resourcecljmultimethod

(get-resource resource loader)

Loads a resource, using the specified loader. Returns a seq of nodes.

Loads a resource, using the specified loader. Returns a seq of nodes.
sourceraw docstring

hasclj

(has selector)

Selector predicate, matches elements which contain at least one element that matches the specified selector. See jQuery's :has

Selector predicate, matches elements which contain at least one element that
matches the specified selector. See jQuery's :has
sourceraw docstring

has-classclj

(has-class & classes)

Selector predicate, :.foo.bar is as short-hand for (has-class "foo" "bar").

Selector predicate, :.foo.bar is as short-hand for (has-class "foo" "bar").
sourceraw docstring

htmlclj

(html & nodes-specs)

Allows to define inline fragments with a hiccup-like syntax.

Allows to define inline fragments with a hiccup-like syntax.
sourceraw docstring

html-contentclj

(html-content & values)

Replaces the content of the element. Values are strings containing html code.

Replaces the content of the element. Values are strings containing html code.
sourceraw docstring

html-resourceclj

(html-resource resource)
(html-resource resource options)

Loads an HTML resource, returns a seq of nodes.

Loads an HTML resource, returns a seq of nodes.
sourceraw docstring

html-snippetclj

(html-snippet & values)

Concatenate values as a string and then parse it with tagsoup. html-snippet doesn't insert missing <html> or <body> tags.

Concatenate values as a string and then parse it with tagsoup.
html-snippet doesn't insert missing <html> or <body> tags.
sourceraw docstring

id=clj

(id= id)

Selector predicate, :#foo is as short-hand for (id= "foo").

Selector predicate, :#foo is as short-hand for (id= "foo").
sourceraw docstring

intersectionclj

(intersection preds)
source

last-childclj

source

last-of-typeclj

source

leftclj

(left selector-step)

Selector predicate, matches nodes whose immediate left sibling element is matched by the specified selector-step.

Selector predicate, matches nodes whose immediate left sibling element is
matched by the specified selector-step.
sourceraw docstring

leftsclj

(lefts selector-step)

Selector predicate, matches nodes whose one left sibling element is matched by the specified selector-step.

Selector predicate, matches nodes whose one left sibling element is matched by
the specified selector-step.
sourceraw docstring

let-selectcljmacro

(let-select nodes-or-fragments bindings & body)

For each node or fragment, performs a subselect and bind it to a local, then evaluates body. bindings is a vector of binding forms and selectors.

For each node or fragment, performs a subselect and bind it to a local,
then evaluates body.
bindings is a vector of binding forms and selectors.
sourceraw docstring

lockstep-transformclj

(lockstep-transform nodes transformations-map)
source

lockstep-transformationcljmacro

(lockstep-transformation & forms)
source

moveclj

(move src-selector dest-selector)
(move src-selector dest-selector combiner)

Takes all nodes (under the current element) matched by src-selector, removes them and combines them with the elements matched by dest-selector. By default, destination elements are replaced.

Takes all nodes (under the current element) matched by src-selector, removes
them and combines them with the elements matched by dest-selector.
By default, destination elements are replaced.
sourceraw docstring

node-selector?clj

(node-selector? selector)
source

ns-optionsclj

(ns-options)
(ns-options ns)
source

nth-childclj

(nth-child b)
(nth-child a b)

Selector step, tests if the node has an+b-1 siblings on its left. See CSS :nth-child.

Selector step, tests if the node has an+b-1 siblings on its left. See CSS :nth-child.
sourceraw docstring

nth-last-childclj

(nth-last-child b)
(nth-last-child a b)

Selector step, tests if the node has an+b-1 siblings on its right. See CSS :nth-last-child.

Selector step, tests if the node has an+b-1 siblings on its right. See CSS :nth-last-child.
sourceraw docstring

nth-last-of-typeclj

(nth-last-of-type b)
(nth-last-of-type a b)

Selector step, tests if the node has an+b-1 siblings of the same type (tag name) on its right. See CSS :nth-last-of-type.

Selector step, tests if the node has an+b-1 siblings of the same type (tag name) on its right. See CSS :nth-last-of-type.
sourceraw docstring

nth-of-typeclj

(nth-of-type b)
(nth-of-type a b)

Selector step, tests if the node has an+b-1 siblings of the same type (tag name) on its left. See CSS :nth-of-type.

Selector step, tests if the node has an+b-1 siblings of the same type (tag name) on its left. See CSS :nth-of-type.
sourceraw docstring

oddclj

source

only-childclj

source

only-of-typeclj

source

predclj

(pred f)

Turns a predicate function on elements into a predicate-step usable in selectors.

Turns a predicate function on elements into a predicate-step usable in selectors.
sourceraw docstring

prependclj

(prepend & values)

Prepends the values to the content of the selected element.

Prepends the values to the content of the selected element.
sourceraw docstring

re-predclj

(re-pred re)

Turns a regex into a predicate-step on text nodes usable in selectors.

Turns a regex into a predicate-step on text nodes usable in selectors.
sourceraw docstring

register-resource!cljmultimethod

source

remove-attrclj

(remove-attr & attr-names)

Dissocs attributes on the selected element.

Dissocs attributes on the selected element.
sourceraw docstring

remove-classclj

(remove-class & classes)

Removes the specified classes from the selected element.

Removes the specified classes from the selected element.
sourceraw docstring

replace-varsclj

(replace-vars m)
(replace-vars re m)
(replace-vars re m f)

By default, takes a map (or function) of keywords to strings and replaces all occurences of ${foo} by (m :foo) in text nodes and attributes. Does not recurse, you have to pair it with an appropriate selector. re is a regex whose first group will be passed to (comp m f) and f by default is #'keyword.

By default, takes a map (or function) of keywords to strings and replaces
all occurences of ${foo} by (m :foo) in text nodes and attributes.
Does not recurse, you have to pair it with an appropriate selector.
re is a regex whose first group will be passed to (comp m f) and f by
default is #'keyword.
sourceraw docstring

replace-wordsclj

(replace-words words-to-replacements)

Takes a map of words to replacement strings and replaces all occurences. Does not recurse, you have to pair it with an appropriate selector.

Takes a map of words to replacement strings and replaces 
all occurences. Does not recurse, you have to pair it with an appropriate
selector.
sourceraw docstring

(right selector-step)

Selector predicate, matches nodes whose immediate right sibling element is matched by the specified selector-step.

Selector predicate, matches nodes whose immediate right sibling element is
matched by the specified selector-step.
sourceraw docstring

rightsclj

(rights selector-step)

Selector predicate, matches nodes whose one left sibling element is matched by the specified selector-step.

Selector predicate, matches nodes whose one left sibling element is matched by
the specified selector-step.
sourceraw docstring

rootclj

source

selectclj

(select node-or-nodes selector)

Returns the seq of nodes or fragments matched by the specified selector.

Returns the seq of nodes or fragments matched by the specified selector.
sourceraw docstring

select-fragments*clj

(select-fragments* nodes selector)
source

select-nodes*clj

(select-nodes* nodes selector)
source

self-closing-tagsclj

source

set-attrclj

(set-attr & kvs)

Assocs attributes on the selected element.

Assocs attributes on the selected element.
sourceraw docstring

set-ns-options!clj

(set-ns-options! options)

Sets the default options to use by all templates and snippets in the declaring ns.

Sets the default options to use by all templates and snippets in the
declaring ns.
sourceraw docstring

set-ns-parser!clj

(set-ns-parser! parser)

Sets the default parser to use by all templates and snippets in the declaring ns.

Sets the default parser to use by all templates and snippets in the
declaring ns.
sourceraw docstring

snippetcljmacro

(snippet source selector args & forms)

A snippet is a function that returns a seq of nodes.

A snippet is a function that returns a seq of nodes.
sourceraw docstring

snippet*cljmacro

(snippet* nodes & body)
source

sniptestcljmacro

(sniptest source-string & forms)

A handy macro for experimenting at the repl

A handy macro for experimenting at the repl
sourceraw docstring

sniptest*clj

(sniptest* nodes f)
source

strict-modecljmacro

(strict-mode & forms)

Adds xhtml-transitional DTD to switch browser in 'strict' mode.

Adds xhtml-transitional DTD to switch browser in 'strict' mode.
sourceraw docstring

strict-mode*clj

(strict-mode* node)
source

substituteclj

(substitute & values)

Replaces the current selection (node or fragment).

Replaces the current selection (node or fragment).
sourceraw docstring

tag=clj

(tag= tag-name)

Selector predicate, :foo is as short-hand for (tag= :foo).

Selector predicate, :foo is as short-hand for (tag= :foo).
sourceraw docstring

templatecljmacro

(template source args & forms)

A template returns a seq of string.

A template returns a seq of string.
sourceraw docstring

textclj

(text node)

Returns the text value of a node.

Returns the text value of a node.
sourceraw docstring

text-nodeclj

source

text-predclj

(text-pred f)

Turns a predicate function on strings (text nodes) into a predicate-step usable in selectors.

Turns a predicate function on strings (text nodes) into a predicate-step usable in selectors.
sourceraw docstring

textsclj

(texts nodes)

Returns the text value of a nodes collection.

Returns the text value of a nodes collection.
sourceraw docstring

this-nodeclj

source

transformclj

(transform nodes selector transformation)
source

transform-contentcljmacro

(transform-content & body)
source

transformationcljmacro

(transformation)
(transformation form)
(transformation form & forms)
source

unionclj

(union preds)
source

unwrapclj

source

voidclj

source

whitespaceclj

source

with-optionscljmacro

(with-options m & body)
source

wrapclj

(wrap tag)
(wrap tag attrs)
source

xml-parserclj

(xml-parser stream)

Loads and parse a XML resource and closes the stream.

Loads and parse a XML resource and closes the stream.
sourceraw docstring

xml-resourceclj

(xml-resource resource)

Loads an XML resource, returns a seq of nodes.

Loads an XML resource, returns a seq of nodes.
sourceraw docstring

zip-predclj

(zip-pred f)

Turns a predicate function on elements locs into a predicate-step usable in selectors.

Turns a predicate function on elements locs into a predicate-step usable in selectors.
sourceraw docstring

zip-selectclj

(zip-select locs selector)

Returns the seq of locs matched by the specified selector.

Returns the seq of locs matched by the specified selector.
sourceraw docstring

zip-select-fragments*clj

(zip-select-fragments* locs state-from state-to)
source

zip-select-nodes*clj

(zip-select-nodes* locs state)
source

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

× close