Add new XML parsing function to prevent "head" errors