org.jdom2.Element.toString()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(138)

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

Element.toString介绍

[英]This returns a String representation of the Element, suitable for debugging. If the XML representation of the Element is desired, org.jdom2.output.XMLOutputter#outputString(Element)should be used.
[中]这将返回适合调试的ElementString表示形式。如果需要Element的XML表示形式,请单击org。jdom2。输出应使用XMLOutputter#outputString(元素)。

代码示例

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

Attribute encryptedPassword = element.getAttribute(attributeName);
  encryptedPassword.setValue(reEncryptUsingNewKey(decodeHex(oldCipher), decodeHex(newCipher), encryptedPassword.getValue()));
  LOGGER.debug("Replaced encrypted value at {}", element.toString());
for (Element element : encryptedNode) {
  element.setText(reEncryptUsingNewKey(decodeHex(oldCipher), decodeHex(newCipher), element.getValue()));
  LOGGER.debug("Replaced encrypted value at {}", element.toString());

代码示例来源:origin: org.jdom/jdom

if (rootElement != null) {
  stringForm.append("Root is ")
  .append(rootElement.toString());
} else {
  stringForm.append(" No root element"); // shouldn't happen

代码示例来源:origin: org.codehaus.plexus/plexus-component-metadata

/**
 * {@link org.jdom2.Element#toString()}
 * {@inheritDoc}
 */
public String toString()
{
  return element.toString();
}

相关文章

微信公众号

最新文章

更多