insert_from_xmldoc

igwn_ligolw.utils.ligolw_sqlite.insert_from_xmldoc(connection, source_xmldoc, preserve_ids=False, verbose=False)

Insert the tables from an in-ram XML document into the database at the given connection. If preserve_ids is False (default), then row IDs are modified during the insert process to prevent collisions with IDs already in the database. If preserve_ids is True then IDs are not modified; this will result in database consistency violations if any of the IDs of newly-inserted rows collide with row IDs already in the database, and is generally only sensible when inserting a document into an empty database. If verbose is True then progress reports will be printed to stderr.