indexing description : "System's root class" date: "$Date$" revision: "$Revision$" class APPLICATION create make feature -- Initialization make is -- Run application. local doc: XML_DOCUMENT song, root: XML_NODE do create doc.make doc.load_from_file ("test_files/test.xml") if doc.has_error then io.put_string (doc.last_error) end root := doc.document_element song := root.select_single_node ("song") test_xpath (doc, "lyrix/song/title") test_xpath (doc, "lyrix//@id") test_xpath (song, "//@date") test_xpath (doc, "//name") test_xpath (song, "albuminfo/*/..") test_xpath_single (doc, "//name/@test/..") doc.save_to_file ("bla.xml", True) -- doc.load_from_file ("test.xml") -- io.put_string (doc.debug_out) end test_xpath (node: XML_NODE; path: STRING) is -- local nl: XML_NODE_LIST do nl := node.select_nodes (path) io.put_string (path + "%N-----------%N") from nl.start until nl.off loop io.put_string (nl.item.debug_out) nl.forth end end test_xpath_single (node: XML_NODE; path: STRING) is -- local n: XML_NODE do n := node.select_single_node (path) io.put_string (path + "%N-----------%N") if n = Void then io.put_string ("Void") else io.put_string (n.debug_out) end end end -- class APPLICATION