ksoap2 xmlPullParserException unterminated entity ref

前端 未结 3 2039
南旧
南旧 2021-01-19 03:38

I have a user email me yesterday that he is having a problem with my application so i started debugging with him and had him sent me the log of the phone and he is getting a

相关标签:
3条回答
  • 2021-01-19 04:23

    I was having the same problem on an Android 2.2 device and found that ksoap2 2.6.5 isn't compatible with Android 2.2. Well I think that's the problem, all I know is it throws these errors. I downgraded my ksoap2 to 2.4 and it started working again.

    0 讨论(0)
  • 2021-01-19 04:25

    Unterminated entity this error occurs when

    1... Error in response string may be some entity are not closed.

    <root>
        <a> first </a>
        <b>second             <----- </b> missing here
    </roor>
    

    2... You are getting some xml character in xml file

     like      & { } � ...
    

    you need to replace all & with & amp; see this answer

    ...
    String str = writer.toString();
    str = str.replaceAll("&","&amp;");
    str = str.replaceAll("?","&#63;");
    return str;
    
    0 讨论(0)
  • 2021-01-19 04:27

    I had the same problem. the solution was when I send the response from the XML I have to replace the "&" with & in the username, for that some users had the problem but others no.

    So step 2 in "MAC" answer

    0 讨论(0)
提交回复
热议问题