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]
23 ;;(println "xml_handler CALLED[:Node :handler] > AXmlCommandInput instance? > "
24 ;; (instance? com.interrupt.bookkeeping.cc.node.AXmlCommandInput (. node getCommandInput) ))
27 (if (instance? com.interrupt.bookkeeping.cc.node.AXmlCommandInput (. node getCommandInput) )
28 (xml_handler (. node getCommandInput) handler)
29 (println "EEeee.. xml_hanlder not processing")
32 (println "EEeee.. xml_hanlder not processing > Error Message[" (. e getMessage) "]")) ;; > StackTrace[" (. e printStackTrace) "]"))
36 (defmethod xml_handler [:AXmlCommandInput :handler] [xinput handler]
38 (if (instance? com.interrupt.bookkeeping.cc.node.AXmlCommandInput xinput )
41 (println "XML input[" xinput "]")
42 (let [xml-string (filterSpacesFromXML (. xinput toString))]
44 (println "XML filtered[" xml-string "]")
45 (handler (clojure.xml/parse (ByteArrayInputStream. (.getBytes xml-string "UTF-8"))))