本文整理了Java中nu.xom.Text.getValue()
方法的一些代码示例,展示了Text.getValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.getValue()
方法的具体详情如下:
包路径:nu.xom.Text
类名称:Text
方法名:getValue
暂无
代码示例来源:origin: jaxen/jaxen
public String getTextStringValue(Object o) {
return (o instanceof Text ? ((Text)o).getValue() : null);
}
代码示例来源:origin: com.thoughtworks.xstream/xstream
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();
}
代码示例来源:origin: stackoverflow.com
Text text = (Text) deviceSubscription.getProperty(PROPERTY_SUBSCRIPTION_IDS);
String subscriptionString = text.getValue();
代码示例来源:origin: stackoverflow.com
Text text = (Text) deviceSubscription.getProperty(PROPERTY_SUBSCRIPTION_IDS);
String ids = text.getValue();
代码示例来源:origin: stackoverflow.com
for (Object text : paragraph) { //paragraph may Contains 100000 of record.
Text textElement = (Text) text;
System.out.println(textElement.getValue());
if (this.g_hMapValues.contains(textElement.getValue())) {
textElement.setValue(String.valueOf(this.g_hMapValues.get(keys)));
}
}
代码示例来源:origin: stackoverflow.com
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();
}
代码示例来源:origin: org.jvnet.hudson/xstream
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();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
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();
}
代码示例来源:origin: edu.internet2.middleware.grouper/grouperClient
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();
}
代码示例来源:origin: com.haulmont.thirdparty/xstream
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();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8
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();
}
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
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();
}
代码示例来源:origin: x-stream/xstream
@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();
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
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();
}
代码示例来源:origin: apache/servicemix-bundles
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();
}
代码示例来源:origin: stackoverflow.com
// 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);
}
代码示例来源:origin: org.teiid/saxon-xom
final void writeText(Text text) {
nodeTokens.add((byte)TEXT);
writeIndex(text.getValue());
}
代码示例来源:origin: teiid/teiid
final void writeText(Text text) {
nodeTokens.add((byte)TEXT);
writeIndex(text.getValue());
}
代码示例来源:origin: org.xml-cml/cmlxom
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;
}
代码示例来源:origin: org.xml-cml/cmlxom
/**
* 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);
}
}
内容来源于网络,如有侵权,请联系作者删除!