public String asString() { StringBuilder buff = new StringBuilder(); for (int i=0;i<size;i++) buff.append(nodeData[i].toPlainTextString()); return buff.toString(); }
public String asString () { StringBuffer buff = new StringBuffer (); for (int i=0;i<size;i++) buff.append (nodeData[i].toPlainTextString ()); return buff.toString (); }
/** * Return the textual contents of this tag and it's children. * @return The 'browser' text contents of this tag. */ public String toPlainTextString() { StringBuffer stringRepresentation = new StringBuffer(); for (SimpleNodeIterator e=children();e.hasMoreNodes();) { stringRepresentation.append(e.nextNode().toPlainTextString()); } return stringRepresentation.toString(); }
/** * Return the textual contents of this tag and it's children. * @return The 'browser' text contents of this tag. */ public String toPlainTextString() { StringBuilder stringRepresentation = new StringBuilder(); for (SimpleNodeIterator e=children();e.hasMoreNodes();) { stringRepresentation.append(e.nextNode().toPlainTextString()); } return stringRepresentation.toString(); }
/** * Returns the node number of the first node containing the given text. * This can be useful to index into the composite tag and get other children. * Text is compared without case sensitivity and conversion to uppercase * uses the supplied locale. * @return int The node index in the children list of the node containing * the text or -1 if not found. * @param locale The locale to use in converting to uppercase. * @param text The text to search for. */ public int findPositionOf (String text, Locale locale) { Node node; int loc; loc = 0; text = text.toUpperCase (locale); for (SimpleNodeIterator e = children (); e.hasMoreNodes (); ) { node = e.nextNode (); if (-1 != node.toPlainTextString ().toUpperCase (locale).indexOf (text)) return loc; loc++; } return -1; }
/** * Returns the node number of the first node containing the given text. * This can be useful to index into the composite tag and get other children. * Text is compared without case sensitivity and conversion to uppercase * uses the supplied locale. * @return int The node index in the children list of the node containing * the text or -1 if not found. * @param locale The locale to use in converting to uppercase. * @param text The text to search for. */ public int findPositionOf (String text, Locale locale) { Node node; int loc; loc = 0; text = text.toUpperCase (locale); for (SimpleNodeIterator e = children (); e.hasMoreNodes (); ) { node = e.nextNode (); if (-1 != node.toPlainTextString ().toUpperCase (locale).indexOf (text)) return loc; loc++; } return -1; }
while (it.hasMoreNodes()) { Node node = it.nextNode(); sb.append(node.toPlainTextString()); sb.append("\n");
while (it.hasMoreNodes()) { Node node = it.nextNode(); sb.append(node.toPlainTextString()); sb.append("\n");
text = node.toPlainTextString (); if (!caseSensitive) text = text.toUpperCase (locale);
text = node.toPlainTextString (); if (!caseSensitive) text = text.toUpperCase (locale);