4 (import 'java.io.ByteArrayInputStream)
9 (defmulti xml_handler (fn [input handler]
11 (if (instance? com.interrupt.bookkeeping.cc.node.AXmlCommandInput input )
12 :AXmlCommandInput ;; com.interrupt.bookkeeping.cc.node.AXmlCommandInput
13 :Node ;;com.interrupt.bookkeeping.cc.node.Node
21 (defmethod xml_handler [:Node :handler] [node handler]
24 (if (instance? com.interrupt.bookkeeping.cc.node.AXmlCommandInput (. node getCommandInput) )
25 (xml_handler (. node getCommandInput) handler)
26 (println "EEeee.. xml_hanlder not processing")
29 (println "EEeee.. xml_hanlder not processing"))
33 (defmethod xml_handler [:AXmlCommandInput :handler] [xinput handler]
35 (if (instance? com.interrupt.bookkeeping.cc.node.AXmlCommandInput xinput )
38 (println "XML input[" xinput "]")
39 (let [xml-string (filterSpacesFromXML (. xinput toString))]
41 (println "XML filtered[" xml-string "]")
42 (handler (clojure.xml/parse (ByteArrayInputStream. (.getBytes xml-string "UTF-8"))))