improved xml parser exception handling