English 中文(简体)
CDATA XML在教区停课时。
原标题:CDATA XML is truncated while parsing

Im利用SRP区(on)把Xml文档从一个网络服务处播下。 关于《欧洲自由贸易协定》的某些内容,《欧洲反弹道导弹条约》已经暂停,而且没有完成,例如,《欧洲反弹道导弹条约》文件载有诸如数据等数据。

 <name><![CDATA[Gölsder und Ginck GmbH]]></name> 

the file file file

public void characters(char[] ch, int start, int length)
   throws SAXException {
   super.characters(ch, start, length);
   String text = new String(ch, start, length);

案文仅载有“Gölsder und Gin”(头15个特性)。 我用粗略的手法 it倒了这个词,我看到,这种方法的“果实”论点没有包含整个脚步。 因此,教区本身似乎有错误。

问题回答

我也存在这一问题。 这正是<代码>characters()方法可以多次被称作同一要素。 阁下:

public void characters(char[] ch, int start, int length)
   throws SAXException {
   super.characters(ch, start, length);
   String text = new String(ch, start, length);
   Log.d("XMLTEST", text);
}

您可能收到两个航标信息:一个Gölsder und Gin和一个ck GmbH

最后,在接受新的特性时,你需要具备你所认为的各位成员变量。

这是我在阅读菲克斯员额后的工作。

private String text;

@Override
public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
        throws SAXException {
       text = null;
}

@Override
public void characters(char[] ch, int start, int length)
        throws SAXException {
    super.characters(ch, start, length);
    if(text != null){
        text += String.copyValueOf(ch, start, length);
    } else {
        text = String.copyValueOf(ch, start, length);
    }
}




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签