A bunch of utility functions for xml documents
A bunch of utility functions for xml documents
(keyword->xml-tag edn-keyword)
Take a clojure keyord and turn it into the form expected by clojure.data.xml
by making it UPPER CASE and snake_cased
Take a clojure keyord and turn it into the form expected by `clojure.data.xml` by making it UPPER CASE and snake_cased
(unique-tags? xml-seq)
Take an XML sequence as formatted by clojure.xml/parse
, and determine if it exclusively contains unique tags
Take an XML sequence as formatted by `clojure.xml/parse`, and determine if it exclusively contains unique tags
(xml->edn xml-doc)
(xml->edn xml-doc opts)
Transform an XML document as formatted by clojure.xml/parse
, and transform it into normalized EDN.
By default, this also mutates keys from XML_CASE to lisp-case and ignores XML attributes within tags.
To change this behavior, an option map may be provided with the following keys:
preserve-keys? - to maintain the exact keyword structure provided by clojure.xml/parse
preserve-attrs? - to maintain embedded XML attributes
Transform an XML document as formatted by `clojure.xml/parse`, and transform it into normalized EDN. By default, this also mutates keys from XML_CASE to lisp-case and ignores XML attributes within tags. To change this behavior, an option map may be provided with the following keys: preserve-keys? - to maintain the exact keyword structure provided by `clojure.xml/parse` preserve-attrs? - to maintain embedded XML attributes
(xml-map->edn xml-map)
(xml-map->edn {:keys [tag attrs content]}
{:keys [preserve-keys? preserve-attrs?] :as opts})
Transform an XML map as formatted by clojure.xml/parse
, and transform it into normalized EDN.
By default, this also mutates keys from XML_CASE to lisp-case and ignores XML attributes within tags.
To change this behavior, an option map be provided with the following keys:
preserve-keys? - to maintain the exact keyword structure provided by clojure.xml/parse
preserve-attrs? - to maintain embedded XML attributes
Transform an XML map as formatted by `clojure.xml/parse`, and transform it into normalized EDN. By default, this also mutates keys from XML_CASE to lisp-case and ignores XML attributes within tags. To change this behavior, an option map be provided with the following keys: preserve-keys? - to maintain the exact keyword structure provided by `clojure.xml/parse` preserve-attrs? - to maintain embedded XML attributes
(xml-seq->edn xml-seq)
(xml-seq->edn xml-seq opts)
Transform an XML sequence as formatted by clojure.xml/parse
, and transform it into normalized EDN.
By default, this also mutates keys from XML_CASE to lisp-case and ignores XML attributes within tags.
To change this behavior, an option map be provided with the following keys:
preserve-keys? - to maintain the exact keyword structure provided by clojure.xml/parse
preserve-attrs? - to maintain embedded XML attributes
Transform an XML sequence as formatted by `clojure.xml/parse`, and transform it into normalized EDN. By default, this also mutates keys from XML_CASE to lisp-case and ignores XML attributes within tags. To change this behavior, an option map be provided with the following keys: preserve-keys? - to maintain the exact keyword structure provided by `clojure.xml/parse` preserve-attrs? - to maintain embedded XML attributes
(xml-tag->keyword xml-tag)
Take an XML tag as extracted by clojure.data.xml
and turn it into a kebab-cased, lower case keyword
Take an XML tag as extracted by `clojure.data.xml` and turn it into a kebab-cased, lower case keyword
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close