/** * Report number of characters currently stored in this node's * data. It may be 0, meaning that the value is an empty string. */ public int getLength() { if (needsSyncData()) { synchronizeData(); } return data.length(); }
/** * Retrieve character data currently stored in this node. * * @throws DOMExcpetion(DOMSTRING_SIZE_ERR) In some implementations, * the stored data may exceed the permitted length of strings. If so, * getData() will throw this DOMException advising the user to * instead retrieve the data in chunks via the substring() operation. */ public String getData() { if (needsSyncData()) { synchronizeData(); } return data; }
public String getNodeValue() { if (needsSyncData()) { synchronizeData(); } return data; }
throws DOMException { if (needsSyncData()) { synchronizeData();
if (needsSyncData()) { synchronizeData();
/** * Concatenate additional characters onto the end of the data * stored in this node. Note that this, and insert(), are the paths * by which a DOM could wind up accumulating more data than the * language's strings can easily handle. (See above discussion.) * * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if node is readonly. */ public void appendData(String data) { if (isReadOnly()) { String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } if (data == null) { return; } if (needsSyncData()) { synchronizeData(); } setNodeValue(this.data + data); } // appendData(String)
if (needsSyncData()) { synchronizeData();
if (needsSyncData()) { synchronizeData();
if (needsSyncData()) { synchronizeData();