Welcome! Please see the About page for a little more info on how this works.

0 votes
in data.xml by
Unlike plain maps and records, XML element records don't print metadata when {{\*print-meta*}} is enabled. It would be useful to have data.xml honour this setting when printing.

(require '[clojure.data.xml :as xml])

(set! *print-meta* true)

(with-meta (xml/element :foo) {::xml/location-info {}})
;; => #xml/element{:tag :foo}

(with-meta {:tag :foo} {::xml/location-info {}})
;; => ^#:clojure.data.xml{:location-info {}} {:tag :foo}

This is a minor enhancement but something that I missed while debugging data.xml data structures.

1 Answer

0 votes
Reference: https://clojure.atlassian.net/browse/DXML-57 (reported by glts)