Handle XML Namespaces with QNames and Keywords
masterIn data.xml, XML Namespaced names (QNames) are encoded into Clojure keywords by percent-encoding the namespace URI. For example, {http://www.w3.org/1999/xhtml}head becomes :http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml/head.
When parsing, the resulting tag will be a keyword with the encoded namespace. When emitting, you can use xml/alias-uri to create shorthands for namespaces, allowing you to use Clojure's ::kw-ns/shorthands (e.g., ::xh/html).
;; Parsing a namespaced element
(xml/parse-str "<?xml version="1.0" encoding="UTF-8"?>
<foo:html xmlns:foo="http://www.w3.org/1999/xhtml"/>")
;; => #xml/element{:tag :xmlns.http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml/html}
;; Emitting with aliases
(xml/alias-uri 'xh "http://www.w3.org/1999/xhtml")
(xml/emit-str {:tag ::xh/html :content []})
;; => <?xml version="1.0" encoding="UTF-8"?>
;; <a:html xmlns:a="http://www.w3.org/1999/xhtml"></a:html>