23 |
try: |
try: |
24 |
dom = self.reader.fromStream(input) |
dom = self.reader.fromStream(input) |
25 |
except: |
except: |
26 |
fraggleError.errorFileNotFound() |
fraggleError.errorXMLStreamNotValid() |
27 |
return dom |
return dom |
28 |
|
|
29 |
def printXML(self,inputDom,outputLocation): |
def printXML(self,inputDom,outputLocation): |
31 |
file = open(outputLocation,"w") |
file = open(outputLocation,"w") |
32 |
self.reader.PrettyPrint(inputDom,file) |
self.reader.PrettyPrint(inputDom,file) |
33 |
except: |
except: |
34 |
fraggleError.errorFileNotFound() |
fraggleError.errorFileNotFound(outputLocation) |
35 |
|
|
36 |
def marshalXML(self,values,outputLocation): |
def marshalXML(self,values,outputLocation): |
37 |
try: |
try: |
39 |
# self.marshall.dump(values,file) |
# self.marshall.dump(values,file) |
40 |
generic.dump(values,file) |
generic.dump(values,file) |
41 |
except: |
except: |
42 |
fraggleError.errorFileNotFound() |
fraggleError.errorFileNotFound(outputLocation) |
43 |
|
|
44 |
|
|
45 |
#print generic.dumps(values) |
#print generic.dumps(values) |
48 |
try: |
try: |
49 |
file = open(inputLocation,"r") |
file = open(inputLocation,"r") |
50 |
except: |
except: |
51 |
fraggleError.errorFileNotFound() |
fraggleError.errorFileNotFound(inputLocation) |
52 |
return generic.load(file) |
return generic.load(file) |
53 |
|
|