“Content is not allowed in prolog” when parsing perfectly valid XML on GAE

后端 未结 13 2123
抹茶落季
抹茶落季 2020-11-27 15:20

I\'ve been beating my head against this absolutely infuriating bug for the last 48 hours, so I thought I\'d finally throw in the towel and try asking here before I throw my

13条回答
  •  野性不改
    2020-11-27 16:00

    In the spirit of "just delete all those weird characters before the

        BufferedReader test = new BufferedReader(new InputStreamReader(fisTest));
        test.mark(4);
        while (true) {
            int earlyChar = test.read();
            System.out.println(earlyChar);
            if (earlyChar == 60) {
                test.reset();
                break;
            } else {
                test.mark(4);
            }
        }
    

    FWIW, the bytes I was seeing are (in decimal): 239, 187, 191.

提交回复
热议问题