org.dom4j.Element.elementText()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(575)

本文整理了Java中org.dom4j.Element.elementText()方法的一些代码示例,展示了Element.elementText()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.elementText()方法的具体详情如下:
包路径:org.dom4j.Element
类名称:Element
方法名:elementText

Element.elementText介绍

暂无

代码示例

代码示例来源:origin: igniterealtime/Openfire

String method = doc.elementText("method");
if (!"zlib".equals(method)) {
  error = "<failure xmlns='http://jabber.org/protocol/compress'><unsupported-method/></failure>";

代码示例来源:origin: igniterealtime/Openfire

String method = doc.elementText("method");
if (!"zlib".equals(method)) {
  error = "<failure xmlns='http://jabber.org/protocol/compress'><unsupported-method/></failure>";

代码示例来源:origin: igniterealtime/Openfire

username = iqElement.elementText("username");
password = iqElement.elementText("password");
email = iqElement.elementText("email");
name = iqElement.elementText("name");

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

private static String getError(Element testCase) {
  String msg = testCase.elementText("error");
  if(msg!=null)
    return msg;
  return testCase.elementText("failure");
}

代码示例来源:origin: org.igniterealtime/tinder

/**
 * Returns a text description of the error, or <tt>null</tt> if there
 * is no text description.
 *
 * @return the text description of the error.
 */
public String getText() {
  return element.elementText("text");
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

private static String getError(Element testCase) {
  String msg = testCase.elementText("error");
  if (msg != null) {
    return msg;
  }
  return testCase.elementText("failure");
}

代码示例来源:origin: javanettasks/javanettasks

/**
 * Gets the current person assigned to the issue.
 *
 * <p>
 * This can be an user name or an alias name, like "issues@hudson".
 * It's not clear exactly what's allowed and what's not.
 */
public String getAssignedTo() {
  return rawData.elementText("assigned_to");
}

代码示例来源:origin: com.atlassian.jira/jira-core

private String parseOptionalString(Element element, String key, String defaultValue)
  {
    final Element optional = element.element(key);
    return (optional != null) ? element.elementText(key) : defaultValue;
  }
}

代码示例来源:origin: javanettasks/javanettasks

/**
 * Gets the number of votes on this issue.
 */
public int getVotes() {
  try {
    return Integer.parseInt(rawData.elementText("votes"));
  } catch (NumberFormatException e) {
    return 0;
  }
}

代码示例来源:origin: net.gltd.gtms/openlinkcommon

@Override
public boolean matches(Object arg0) {
  Element e = (Element) arg0;
  if ((e.element("note") == null) || (e.element("note").attributeValue("type") == null)
      || !e.element("note").attributeValue("type").equals("error")) {
    return false;
  }
  String errTxt = e.elementText("note");
  return this.message.equals(errTxt);
}

代码示例来源:origin: net.gltd.gtms/openlinkcommon

@Override
public boolean matches(Object arg0) {
  Element e = (Element) arg0;
  if ((e.element("note") == null) || (e.element("note").attributeValue("type") == null)
      || !e.element("note").attributeValue("type").equals("error")) {
    return false;
  }
  String errTxt = e.elementText("note");
  return errTxt.contains(this.message) && ((this.value == null) || errTxt.contains(this.value));
}

代码示例来源:origin: com.atlassian.jira/jira-core

static JndiDatasource parse(Element datasourceElement)
{
  String jndiName = datasourceElement.elementText(JNDI_NAME);
  return new JndiDatasource(jndiName);
}

代码示例来源:origin: com.atlassian.jira/jira-core

@Override
public DatabaseConfig parse(Element element)
{
  String name = element.elementText(NAME);
  String delegator = parseOptionalString(element, DELEGATOR_NAME, name);
  String databaseType = element.elementText(DATABASE_TYPE);
  String schemaName = element.elementText(SCHEMA_NAME);
  Datasource datasource = parseDatasource(element);
  return new DatabaseConfig(name, delegator, databaseType, schemaName, datasource);
}

代码示例来源:origin: javanettasks/javanettasks

/**
 * Gets the resolution of this issue.
 */
public IssueResolution getResolution() {
  String s = rawData.elementText("resolution");
  if(s.length()==0) return null;
  return IssueResolution.valueOf(s);
}

代码示例来源:origin: javanettasks/javanettasks

/**
 * Gets the last modified date of this issue.
 */
public Calendar getLastModified() {
  return formatDate(lastModifiedFormat,rawData.elementText("delta_ts"));
}

代码示例来源:origin: javanettasks/javanettasks

/**
 * Gets the version to which this issue belongs to.
 */
public IssueVersion getVersion() {
  return new IssueVersion(rawData.elementText("version"));
}

代码示例来源:origin: javanettasks/javanettasks

/**
 * Gets the type of the issue.
 */
public IssueType getType() {
  return IssueType.valueOf(rawData.elementText("issue_type"));
}

代码示例来源:origin: com.github.sogyf/goja-wxchat

private static InMsg parseInLocationMsg(Element root, String toUserName, String fromUserName, Integer createTime, String msgType) {
  InLocationMsg msg = new InLocationMsg(toUserName, fromUserName, createTime, msgType);
  msg.setLocation_X(root.elementText("Location_X"));
  msg.setLocation_Y(root.elementText("Location_Y"));
  msg.setScale(root.elementText("Scale"));
  msg.setLabel(root.elementText("Label"));
  msg.setMsgId(root.elementText("MsgId"));
  return msg;
}

代码示例来源:origin: com.github.sogyf/goja-wxchat

private static InMsg parseInLinkMsg(Element root, String toUserName, String fromUserName, Integer createTime, String msgType) {
  InLinkMsg msg = new InLinkMsg(toUserName, fromUserName, createTime, msgType);
  msg.setTitle(root.elementText("Title"));
  msg.setDescription(root.elementText("Description"));
  msg.setUrl(root.elementText("Url"));
  msg.setMsgId(root.elementText("MsgId"));
  return msg;
}

代码示例来源:origin: com.github.sogyf/goja-wxchat

private static InMsg parseInVideoMsg(Element root, String toUserName, String fromUserName, Integer createTime, String msgType) {
  InVideoMsg msg = new InVideoMsg(toUserName, fromUserName, createTime, msgType);
  msg.setMediaId(root.elementText("MediaId"));
  msg.setThumbMediaId(root.elementText("ThumbMediaId"));
  msg.setMsgId(root.elementText("MsgId"));
  return msg;
}

相关文章

微信公众号

最新文章

更多

Element类方法