开发者

get problem with " and ' on using saxParser

开发者 https://www.devze.com 2023-04-01 05:32 出处:网络
I am using saxParser. My problem is, if I have an \" or \' in my text I get only the part without \" or \', like:

I am using saxParser. My problem is, if I have an " or ' in my text I get only the part without " or ', like:

ttt'ppp -----> ttt
tt"x    -----> tt

My code is:

public void characters(char ch[], int start, int length) throws SAXException {
                     // MyData   MyData=new   MyData();
   if (item) {
        System.out.println("item : " + new String(ch, start, length开发者_C百科));
        item= false;
                    MyData.item=new String(ch, start, length);

    }

Thanks for help!

0

精彩评论

暂无评论...
验证码 换一张
取 消