Fixing unsafe xmlInputFactory instantiation