(input_file_name)
| 14 | from exceptions import * |
| 15 | from omexceptions import * |
| 16 | def readFile(input_file_name): |
| 17 | docstream = open(input_file_name) |
| 18 | docIS=DOMInputSource() |
| 19 | docIS.byteStream=docstream |
| 20 | doc= DOMBuilder().parse(docIS) |
| 21 | docstream.close() |
| 22 | |
| 23 | root=doc.lastChild |
| 24 | return root |
| 25 | |
| 26 | def readStream(input_stream): |
| 27 | docIS=DOMInputSource() |