Ensures the parser returns the xmlStreamReader object and fixes a syntax error