p12n_extract.py - fix behavior for broken XML