开发者

Value of enter/return

开发者 https://www.devze.com 2023-04-13 06:43 出处:网络
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 ha

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

精彩评论

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

关注公众号