public String getTextStringValue(Object o) { return (o instanceof Text ? ((Text)o).getValue() : null); }
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(); }
Text text = (Text) deviceSubscription.getProperty(PROPERTY_SUBSCRIPTION_IDS); String subscriptionString = text.getValue();
Text text = (Text) deviceSubscription.getProperty(PROPERTY_SUBSCRIPTION_IDS); String ids = text.getValue();
public String getTitleText(final Element title) { final StringBuilder sb = new StringBuilder(); for (final Text txt : title.getDescendants(Filters.text())) { final Element parent = txt.getParentElement(); if (parent == title || parent.getAttributeValue("active", "not").equals("true")) { sb.append(txt.getValue()); } } return sb.toString(); }
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(); }
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(); }
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(); }
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(); }
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(); }
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(); }
@Override public String getValue() { // currentElement.getValue() not used as this includes text of child elements, which we don't want. final StringBuffer result = new StringBuffer(); final int childCount = currentElement.getChildCount(); for (int i = 0; i < childCount; i++) { final Node child = currentElement.getChild(i); if (child instanceof Text) { final Text text = (Text)child; result.append(text.getValue()); } } return result.toString(); }
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(); }
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(); }
// Break the text into multiple lines and draw each one according to its own bounding box. List<? extends Text> textComponents = mText.getComponents(); for(Text currentText : textComponents) { float left = translateX(currentText.getBoundingBox().left); float bottom = translateY(currentText.getBoundingBox().bottom); canvas.drawText(currentText.getValue(), left, bottom, sTextPaint); }
final void writeText(Text text) { nodeTokens.add((byte)TEXT); writeIndex(text.getValue()); }
final void writeText(Text text) { nodeTokens.add((byte)TEXT); writeIndex(text.getValue()); }
public static Element normalizeWhitespaceInTextNodes(Element element) { Nodes texts = element.query(".//text()"); for (int i = 0; i < texts.size(); i++) { Text text = (Text) texts.get(i); text.setValue(normalizeSpace(text.getValue())); } return element; }
/** * some formatted XML introduces spurious WS after text strings * @param element */ public static void stripTrailingWhitespaceinTexts(Element element) { Nodes texts = element.query("//text()"); for (int i = 0; i < texts.size(); i++) { Text text = (Text) texts.get(i); String value = text.getValue(); value = Util.rightTrim(value); text.setValue(value); } }