--- nfo/projects/netfraggle/bin/fraggleParserXML.py 2004/08/25 13:53:48 1.1 +++ nfo/projects/netfraggle/bin/fraggleParserXML.py 2004/08/25 16:56:59 1.2 @@ -2,31 +2,31 @@ import sys from xml.dom.ext.reader import Sax2 -from xml.marshal import generic +from xml.marshal import * def create(parent): - return fraggleParserXML() + return fraggleParserXML(parent) class fraggleParserXML: - def __init_reader__(): - reader = Sax2.Reader() - marshall = generic.Marshaller() + def __init_reader__(self): + self.reader = Sax2.Reader() + def __init__(self,parent): self.__init_reader__() - def parseXML(input): + def parseXML(self,input): dom = self.reader.fromStream(input) return dom - def printXML(inputDom,outputLocation): + def printXML(self,inputDom,outputLocation): file = open(outputLocation,"w") self.reader.PrettyPrint(inputDom,file) - def marshalXML(value,outputLocation): + def marshalXML(self,values,outputLocation): file = open(outputLocation,"w") - marshall.dump(value,file) - - \ No newline at end of file + # self.marshall.dump(values,file) + generic.dump(values,file) + #print generic.dumps(values) \ No newline at end of file