(defn attributes [e]
(let [v (vec (:attrs e))]
(reify org.xml.sax.Attributes
(getLength [_] (count v))
(getURI [_ i] (namespace (key (v i))))
(getLocalName [_ i] (name (key (v i))))
(getQName [_ i] (name (key (v i))))
(getValue [_ uri name] (get (:attrs e) name))
(^String getValue [_ ^int i] (val (v i)))
(^String getType [_ ^int i] "CDATA"))))
Comments top
No comments for attributes. Log in to add a comment.