API for clojure.data.zip - data.zip 1.1.0-SNAPSHOT (in development)
Full namespace name: clojure.data.zip
Overview
Project home page is https://github.com/clojure/data.zip/
System for filtering trees and nodes generated by zip.clj in general, and xml trees in particular.
Public Variables and Functions
ancestors
functionUsage: (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
functionUsage: (children loc)
Returns a lazy sequence of all immediate children of location loc, left-to-right.Source
children-auto
functionUsage: (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
functionUsage: (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
functionUsage: (left-locs loc)
Returns a lazy sequence of locations to the left of loc, starting with loc.Source
leftmost?
functionUsage: (leftmost? loc)
Returns true if there are no more nodes to the left of location loc.Source
right-locs
functionUsage: (right-locs loc)
Returns a lazy sequence of locations to the right of loc, starting with loc.Source
rightmost?
functionUsage: (rightmost? loc)
Returns true if there are no more nodes to the right of location loc.Source
clojure.data.zip.xml
Public Variables and Functions
attr
functionUsage: (attr attrname)
(attr loc attrname)
Returns the xml attribute named attrname, of the xml node at location loc.Source
attr=
functionUsage: (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
functionUsage: (seq-test preds)
Returns a query predicate that matches a node when its xml content matches the query expresions given.Source
tag=
functionUsage: (tag= tagname)
Returns a query predicate that matches a node when its is a tag named tagname.Source
text
functionUsage: (text loc)
Returns the textual contents of the given location, similar to xpaths's value-ofSource
text=
functionUsage: (text= s)
Returns a query predicate that matches a node when its textual content equals s.Source
xml->
functionUsage: (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 xml_test.clj for examples.Source
xml1->
functionUsage: (xml1-> loc & preds)
Returns the first item from loc based on the query predicates given. See xml->Source
Copyright 2007-2023 by Rich Hickey and the various contributors
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.
Clojure auto-documentation system by Tom Faulhaber.
