indexing description: "[ XML parser for the goof level data. ]" date: "$Date$" revision: "$Revision$" class EM_GOOF_LOADER_LEVEL_PARSER inherit EM_GOOF_LOADER_XML_INPUT_FILE_PARSER EM_GOOF_LOADER_NODE_PROCESSOR_REGISTRY create make_with_factory feature -- Initialization make_with_factory (a_goof_level_factory: EM_GOOF_LOADER_LEVEL_FACTORY) is -- Create parser with `a_goof_level_factory'. require a_goof_level_factory_exists: a_goof_level_factory /= Void do set_level_factory(a_goof_level_factory) make from Processor_registry.start until Processor_registry.off loop Processor_registry.item_for_iteration.set_level_factory (a_goof_level_factory) Processor_registry.forth end end feature -- Status report can_process: BOOLEAN is -- Can document tree be processed? do Result := is_parsed and then has_processor (root_element.name) end feature -- Basic operations process is -- Process document tree. local p: EM_GOOF_LOADER_NODE_PROCESSOR do p := processor (root_element.name) p.set_source (root_element) if p.has_error then set_error (p.error_code, p.slots) is_parsed := False end if not has_error then p.process if p.has_error then set_error (p.error_code, p.slots) is_parsed := False end end set_level_factory (p.level_factory) end invariant can_process_definition: can_process = (is_parsed and has_processor (root_element.name)) end