Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/192.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 有问题吗;和';使用saxon语法分析器_Android_Saxparser - Fatal编程技术网

Android 有问题吗;和';使用saxon语法分析器

Android 有问题吗;和';使用saxon语法分析器,android,saxparser,Android,Saxparser,我正在使用saxParser。我的问题是,如果我的文本中有一个“或”,我只得到没有“或”的部分,比如: ttt'ppp -----> ttt tt"x -----> tt 我的代码是: public void characters(char ch[], int start, int length) throws SAXException { // MyData MyData=new MyData(); if (item)

我正在使用saxParser。我的问题是,如果我的文本中有一个
,我只得到没有
的部分,比如:

ttt'ppp -----> ttt
tt"x    -----> tt
我的代码是:

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));
        item= false;
                    MyData.item=new String(ch, start, length);

    }

谢谢你的帮助

您知道可以多次调用字符,并且所有字符的串联都会提供实际内容,对吗?如果我有“或”字符,则所有文本都会正确显示。您的“characters”方法的内容应该包含某种字符串联。看起来是这样的[W,e,d,3,1,A,u,g,2,0,1,1,1,3,:,2,8,:,3,2,+,0,2,0,0,0,r,A,e,l,(,Y,e,d,i,o,t等,直到]