Tintware Documentation : Tint Automation Client : MSXML Example : MSXML Example Source To run this code, you will have to copy it into a file and load the file in Tint Emacs. Use M-x eval-current-buffer to compile the code. Def:Proc:tree(%node) [*] #(def?,oleauto.new-object,,( #(tint.ignore,#(tint.library,toac)) )) #(def?,%node,( #(tree.document,%node,#(oleauto.new-object,msxml2.domdocument)) )) [*] Def:Proc:tree.document(%node,%document) [*] #(tree.child,%node,%document,%document) #(%document.xml.get) #(undef,%document) [*] Def:Proc:tree.child(%node,%parent,%document) [*] #(def?,tree.#(tint.type,%node),( #(tree.#(tint.type,%node),%node,%parent,%document) ),( #(tree.unknown,%node,%parent,#(%document.createElement,unknown)) )) [*] Def:Proc:tree.unknown(%node,%parent,%unknown) [*] #(%unknown.setAttribute,name,#(tint.rfirst,%node,.)) #(%unknown.setAttribute,type,#(tint.type,%node)) #(tree.append,%parent,%unknown) [*] Def:Proc:tree.append(%parent,%child) [*] #(undef,#(%parent.appendChild,%child)) #(undef,%child) [*] Def:Proc:tree.string(%node,%parent,%document) [*] #(tree.string.do,%node,%parent,#(%document.createElement,string), #(%document.createTextNode,)) [*] Def:Proc:tree.string.do(%node,%parent,%string,%text) [*] #(%string.setAttribute,name,#(tint.rfirst,%node,.)) #(%text.data.put,##(%node.get-all)) #(tree.append,%string,%text) #(tree.append,%parent,%string) [*] Def:Proc:tree.procedure(%node,%parent,%document) [*] #(tree.procedure.do,%node,%parent,#(%document.createElement,procedure), #(%document.createTextNode,)) [*] Def:Proc:tree.procedure.do(%node,%parent,%procedure,%text) [*] #(%procedure.setAttribute,name,#(tint.rfirst,%node,.)) #(%text.data.put,##(%node,%arg1,%arg2,%arg3,%arg4,%arg5,%arg6,%arg7,%arg8,%arg9)) #(tree.append,%procedure,%text) #(tree.append,%parent,%procedure) [*] Def:Proc:tree.dict(%node,%parent,%document) [*] #(tree.dict.do,%node,%parent,#(%document.createElement,dict),%document) [*] Def:Proc:tree.dict.do(%node,%parent,%dict,%document) [*] #(%dict.setAttribute,name,#(tint.rfirst,%node,.)) #(tint.foreach,##(tint.list,( ),%node.),( ), (tree.dict.item,%node,%dict,%document)) #(tree.append,%parent,%dict) [*] Def:Proc:tree.dict.item(%node,%dict,%document,%item) [*] #(tree.child,%node.%item,%dict,%document) [*] Def:Proc:tree.array(%node,%parent,%document) [*] #(tree.array.do,%node,%parent,#(%document.createElement,array),%document) [*] Def:Proc:tree.array.do(%node,%parent,%array,%document) [*] #(%array.setAttribute,name,#(tint.rfirst,%node,.)) #(tree.array.item,%node,1,#(%node.max-index),%array,%document) #(tree.append,%parent,%array) [*] Def:Proc:tree.array.item(%node,%idx,%max,%array,%document) [*] #(>,%idx,%max,,( #(def?,%node.%idx,( #(tree.child,%node.%idx,%array,%document) )) #(tree.array.item,%node,#(+,%idx,1),%max,%array,%document) )) [*] |