Project

General

Profile

« Previous | Next » 

Revision 299

Import xml.dom.minidom as minidom

View differences:

map
6 6
import os.path
7 7
import sys
8 8
import traceback
9
import xml.dom.minidom
9
import xml.dom.minidom as minidom
10 10

  
11 11
sys.path.append(os.path.dirname(__file__)+"/../lib")
12 12

  
......
72 72
        stream.close()
73 73
    in_is_xml = in_is_xpaths and not in_is_db
74 74
    
75
    if in_is_xml: doc0 = xml.dom.minidom.parse(sys.stdin)
75
    if in_is_xml: doc0 = minidom.parse(sys.stdin)
76 76
    
77 77
    def process_xml(use_row):
78 78
        '''Maps datasource to XML tree'''
......
163 163
        finally:
164 164
            out_db.rollback()
165 165
            out_db.close()
166
    else:
166
    else: # output is XML
167 167
        def use_row(root): pass # TODO: implement this
168
        xml_dom.writexml(sys.stdout, get_xml(use_row)) # output is XML
168
        output = sys.stdout
169
        doc1 = get_xml(use_row)
170
        xml_dom.writexml(output, doc1)
169 171

  
170 172
try: main()
171 173
except Parser.SyntaxException, e: raise SystemExit(str(e))

Also available in: Unified diff