/** * Updates (replaces) the value of a single document, text, comment, pi or attribute node. * * @param pre pre value to be replaced * @param kind node kind * @param value value to be updated (tag name, text, comment, pi) */ public final void update(final int pre, final int kind, final byte[] value) { final byte[] v = kind == PI ? trim(concat(name(pre, kind), SPACE, value)) : value; if (eq(v, text(pre, kind != ATTR))) return; meta.update(); updateText(pre, v, kind); if (kind == DOC) resources.rename(pre, value); }