开发者

Value of enter/return

I have a Saxparser implementation in Java. I'm parsing an XML file, but I want t开发者_开发技巧o skip doing something in the characters method when the character is an enter. The problem is that I have no idea how to check if the value of the char array is enter.

public void characters(char[] ch, int start, int length) {
String elementData = new String(ch, start, length);
    if (!elementData.equals(valueOfEnter)){
        // Dosomething
    }
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜