public String getNodeValue(NodeImpl node) { switch (node.getNodeType()) { case Node.ELEMENT_NODE : if (node.getChildCount() > 0) { long firstChild = node.firstChildID(); NodeProxy proxy = new NodeProxy((DocumentImpl) node.getOwnerDocument(), firstChild, node.getInternalAddress()); Iterator domIterator = getDOMIterator(proxy); ByteArrayOutputStream buf = new ByteArrayOutputStream(12); getNodeValue(buf, domIterator); byte[] data = buf.toByteArray(); String value; try { value = new String(data, 0, data.length, "UTF-8"); } catch (UnsupportedEncodingException uee) { value = new String(data, 0, data.length); } return value; } else return ""; case Node.TEXT_NODE : return ((Text) node).getData(); default : return ""; }
public String getNodeValue(final NodeProxy proxy) { return (String) new DOMTransaction(this, domDb, Lock.READ_LOCK) { public Object start() { return domDb.getNodeValue(proxy); } }.run();
	public String getNodeValue(NodeImpl node) {		switch (node.getNodeType()) {			case Node.ELEMENT_NODE :				if (node.getChildCount() > 0) {					long firstChild = node.firstChildID();					NodeProxy proxy =						new NodeProxy((DocumentImpl) node.getOwnerDocument(), firstChild,							node.getInternalAddress());					Iterator domIterator = getDOMIterator(proxy);					ByteArrayOutputStream buf = new ByteArrayOutputStream(12);					getNodeValue(buf, domIterator);					byte[] data = buf.toByteArray();					String value;					try {						value = new String(data, 0, data.length, "UTF-8");					} catch (UnsupportedEncodingException uee) {						value = new String(data, 0, data.length);					}					return value;				} else					return "";			case Node.TEXT_NODE :				return ((Text) node).getData();			default :				return "";		}	}