nu.xom.Text Java Examples
The following examples show how to use
nu.xom.Text.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XomReader.java From lams with GNU General Public License v2.0 | 5 votes |
public String getValue() { // currentElement.getValue() not used as this includes text of child elements, which we don't want. StringBuffer result = new StringBuffer(); int childCount = currentElement.getChildCount(); for(int i = 0; i < childCount; i++) { Node child = currentElement.getChild(i); if (child instanceof Text) { Text text = (Text) child; result.append(text.getValue()); } } return result.toString(); }
Example #2
Source File: SimpleNodeFactory.java From caja with Apache License 2.0 | 2 votes |
/** * <code>return new Text(string);</code> * @param string * @return */ public Text makeText(String string) { return new Text(string); }