Code example for Node

Methods: getTextContentsetTextContent

0
		 
		if (node == null) {
			node = addNode(doc, xPathExpression);
		} 
 
		final String currentValue = node.getTextContent();
		 
		if (currentValue.isEmpty() || !preventOverwrite) {
			node.setTextContent(value);
			return value;
		} 
		return currentValue;
	} 
	 
	/** 
	 * Adds the node chain defined by the {@code xPath}. If the {@link Node} 
	 * at the end of the path exists then it will just return it. 
	 * 
	 * @param doc 
	 * @param xPathExpression 
Stop searching for code, let great code find you!  Add Codota to your java IDE