More robust XML parsing
Added test for external parameter entities