From bacab19fafb59151aeadba6473c7d89eb93cae47 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Thu, 10 Oct 2002 16:07:08 +0000 Subject: [PATCH] Simpler XML parsing. git-svn-id: http://dom-editor.googlecode.com/svn/branches/Gtk2@418 ef21e15d-ca94-4315-9c45-0d95b1b2e117 --- Dome/View.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Dome/View.py b/Dome/View.py index 2e1afc7..eb6d70d 100644 --- a/Dome/View.py +++ b/Dome/View.py @@ -1364,15 +1364,13 @@ class View: print "parsing...", - from Ft.Xml.InputSource import InputSourceFactory - from Ft.Xml.cDomlette import nonvalParse - isrc = InputSourceFactory() + from Ft.Xml.Domlette import NonvalidatingReader try: # Hack to stop 4Suite getting confused with the namespaces i = data.find('', i) + 1:] - root = nonvalParse(isrc.fromString(data, uri)) + root = NonvalidatingReader.parseString(data, uri) #ext.StripHtml(root) except: type, val, tb = sys.exc_info() @@ -1614,12 +1612,10 @@ class View: def parse_data(self, data, path): """Convert and XML document into a DOM Document.""" - from Ft.Xml.InputSource import InputSourceFactory - from Ft.Xml.cDomlette import nonvalParse - isrc = InputSourceFactory() + from Ft.Xml.Domlette import NonvalidatingReader try: - doc = nonvalParse(isrc.fromString(data, path)) + doc = NonvalidatingReader.parseString(data, path) except: type, val, tb = sys.exc_info() traceback.print_exception(type, val, tb) -- 2.11.4.GIT