API for zip-filter
- ()
by Chris Houser
clojure-contrib is now deprecated
clojure-contrib is no longer being developed or maintained.
Rather than a single, monolithic, contributions library, Clojure now has
a set of separate libraries for each unit of functionality. The libraries
are in the Clojure GitHub organization at
https://github.com/clojure.
API documentation of the libraries can be found at
https://clojure.github.io.
If you're looking for a specific function or namespace from the old
clojure-contrib, see
"Where Did Clojure.Contrib Go".
Full namespace name:
clojure.contrib.zip-filter
Overview
System for filtering trees and nodes generated by zip.clj in
general, and xml trees in particular.
Public Variables and Functions
ancestors
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (ancestors loc)
Returns a lazy sequence of all ancestors of location loc, starting
with loc and proceeding to loc's parent node and on through to the
root of the tree.
Source
children
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (children loc)
Returns a lazy sequence of all immediate children of location loc,
left-to-right.
Source
children-auto
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (children-auto loc)
Returns a lazy sequence of all immediate children of location loc,
left-to-right, marked so that a following tag= predicate will auto-descend.
Source
descendants
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (descendants loc)
Returns a lazy sequence of all descendants of location loc, in
depth-first order, left-to-right, starting with loc.
Source
left-locs
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (left-locs loc)
Returns a lazy sequence of locations to the left of loc, starting with loc.
Source
leftmost?
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (leftmost? loc)
Returns true if there are no more nodes to the left of location loc.
Source
right-locs
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (right-locs loc)
Returns a lazy sequence of locations to the right of loc, starting with loc.
Source
rightmost?
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (rightmost? loc)
Returns true if there are no more nodes to the right of location loc.
Source
zip-filter.xml
attr
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (attr attrname)
(attr loc attrname)
Returns the xml attribute named attrname, of the xml node at location loc.
Source
attr=
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (attr= attrname attrval)
Returns a query predicate that matches a node when it has an
attribute named attrname whose value is attrval.
Source
seq-test
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (seq-test preds)
Returns a query predicate that matches a node when its xml content
matches the query expresions given.
Source
tag=
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (tag= tagname)
Returns a query predicate that matches a node when its is a tag
named tagname.
Source
text
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (text loc)
Returns the textual contents of the given location, similar to
xpaths's value-of
Source
text=
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (text= s)
Returns a query predicate that matches a node when its textual
content equals s.
Source
xml->
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (xml-> loc & preds)
The loc is passed to the first predicate. If the predicate returns
a collection, each value of the collection is passed to the next
predicate. If it returns a location, the location is passed to the
next predicate. If it returns true, the input location is passed to
the next predicate. If it returns false or nil, the next predicate
is not called.
This process is repeated, passing the processed results of each
predicate to the next predicate. xml-> returns the final sequence.
The entire chain is evaluated lazily.
There are also special predicates: keywords are converted to tag=,
strings to text=, and vectors to sub-queries that return true if
they match.
See the footer of zip-query.clj for examples.
Source
xml1->
function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (xml1-> loc & preds)
Returns the first item from loc based on the query predicates
given. See xml->
Source