greatly improve XML parsing