Shared XML helpers for the form parsers (plain clojure.xml — no extra deps). Tag matching ignores namespace prefixes, so :infoTable matches both <infoTable> and ns1:infoTable.
Shared XML helpers for the form parsers (plain clojure.xml — no extra deps). Tag matching ignores namespace prefixes, so :infoTable matches both <infoTable> and <ns1:infoTable>.
(child node tag)First direct child element of node whose tag matches.
First *direct* child element of node whose tag matches.
(child-text node tag)Text of the first direct child element matching tag.
Text of the first direct child element matching tag.
(find-tag node tag)First descendant element (depth-first, including node itself) whose tag matches.
First descendant element (depth-first, including node itself) whose tag matches.
(find-tags node tag)All descendant elements (including node itself) whose tag matches, in document order.
All descendant elements (including node itself) whose tag matches, in document order.
(nested-text node & tags)Walk a path of tags (each a descendant search) from node and return the leaf text.
Walk a path of tags (each a descendant search) from node and return the leaf text.
(parse-double-safe s)Parse a numeric string to a double; nil for nil or unparseable input.
Parse a numeric string to a double; nil for nil or unparseable input.
(parse-str s)Parse an XML string into a clojure.xml element tree.
Parse an XML string into a clojure.xml element tree.
(tag-matches? tag node-tag)True when node-tag is tag, ignoring any namespace prefix on node-tag.
True when node-tag is tag, ignoring any namespace prefix on node-tag.
(tag-text node & tags)Text of the first descendant matching any of the given tags, tried in order (schemas sometimes spell one field several ways).
Text of the first descendant matching any of the given tags, tried in order (schemas sometimes spell one field several ways).
(text node)Trimmed text content of an element, or nil when empty.
Trimmed text content of an element, or nil when empty.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |