if(inModification) { if(inAttribute) ((Attr)currentNode).setValue(new String(ch, start, length)); else { Text text = doc.createTextNode(new String(ch, start, length)); if(stack.isEmpty()) { LOG.debug("appending text to fragment: " + text.getData()); fragment.appendChild(text); } else { Element last = (Element)stack.peek(); last.appendChild(text); } } }
if (inModification) { if (inAttribute) ((Attr) currentNode).setValue(new String(ch, start, length)); else { charBuf.append(ch, start, length); } }
	public void characters(char[] ch, int start, int length)		throws SAXException {        if(inModification) {            if(inAttribute)                ((Attr)currentNode).setValue(new String(ch, start, length));            else {                Text text = doc.createTextNode(new String(ch, start, length));                if(stack.isEmpty()) {                    LOG.debug("appending text to fragment: " + text.getData());                    fragment.appendChild(text);                } else {                    Element last = (Element)stack.peek();                    last.appendChild(text);                }            }        }	}