Some XML parsing fixes.