Clean up XML parser