Revision 294
Added by Aaron Marcuse-Kubitza almost 13 years ago
db_xml.py | ||
---|---|---|
1 | 1 |
# XML-database conversion |
2 | 2 |
|
3 | 3 |
import re |
4 |
import traceback |
|
4 | 5 |
from xml.dom import Node |
5 | 6 |
|
6 | 7 |
import sql |
... | ... | |
105 | 106 |
def xml2db(db, node, row_ct_ref=None): |
106 | 107 |
iter_ = xml_dom.NodeElemIter(node) |
107 | 108 |
util.skip(iter_, xml_dom.is_text) # skip metadata |
108 |
for child in iter_: put(db, child, False, row_ct_ref) |
|
109 |
for child in iter_: |
|
110 |
try: put(db, child, False, row_ct_ref) |
|
111 |
except Exception: traceback.print_exc() |
Also available in: Unified diff
Use traceback.print_exc() to print Exceptions for each row instead of exiting