Fixes to XMLParser