Revision 40
Added by Aaron Marcuse-Kubitza about 13 years ago
xml2db | ||
---|---|---|
27 | 27 |
db.set_isolation_level(ISOLATION_LEVEL_SERIALIZABLE) |
28 | 28 |
try: |
29 | 29 |
doc = xml.dom.minidom.parse(sys.stdin) |
30 |
print 'Inserted '+str(xml_db.xml2db(doc.documentElement, db))+' rows' |
|
30 |
row_ct_ref = [0] |
|
31 |
xml_db.xml2db(db, doc.documentElement, row_ct_ref) |
|
32 |
print 'Inserted '+str(row_ct_ref[0])+' rows' |
|
31 | 33 |
if commit: db.commit() |
32 | 34 |
finally: |
33 | 35 |
db.rollback() |
Also available in: Unified diff
xml2db: Started refactoring xml2db() to support getting as well as inserting data