Project

General

Profile

« Previous | Next » 

Revision 2026

bin/map: If out_is_db, in debug mode, print the template XML tree used to insert a sample row into the DB

View differences:

bin/map
209 209
            '''Maps input rows
210 210
            @param get_value(in_, row):str
211 211
            '''
212
            id_node = None
213
            if out_is_db:
214
                for i, mapping in enumerate(mappings):
215
                    in_, out = mapping
216
                    # All put_obj()s should return the same id_node
217
                    nodes, id_node = xpath.put_obj(root, out, '-1', has_types,
218
                        '$'+str(in_)) # value is placeholder that documents name
219
                #assert id_node != None
220
                
221
                if debug: # only str() if debug
222
                    log_debug('Put template:\n'+str(root))
223
                prep_root()
224
            
212 225
            def process_row(row, i):
213 226
                row_id = str(i)
214 227
                for in_, out in mappings:

Also available in: Unified diff