(XMLReader): Renamed from XMLProcessor to
promote symmetry. There now exists XMLReader and XMLWriter.
(XMLReader.read): New. Call to read the given file descriptor or
filename.
(XMLReader.close): New. Make sure the file is closed.
(XMLReader.GetFileName): New. Return just the file name that is being read from.
(XMLReader.GetDirectory): New. Return just the directory of the file
that is being read.
(XMLReader.AddDispatchers): New. Take a dictionary which contains
the names of functions to call as the XML tree is parsed.
(XMLReader.startElementNS): Updated to use new dispatcher dictionary.
(XMLReader.endElementNS): Updated to use new dispatcher dictionary.
(SessionLoader): Removed class variables start_dispatcher and
end_dispatcher since this functionality is now part of a class
instance. Fixes RTbug #1808.
(SessionLoader.__init__): Add dispatcher functions.
(load_xmlfile): Code was moved into the XMLReader.read().
(load_session): Use modified SessionLoader.
|