- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.znerd.xmlenc.XMLOutputter.attribute()
方法的一些代码示例,展示了XMLOutputter.attribute()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLOutputter.attribute()
方法的具体详情如下:
包路径:org.znerd.xmlenc.XMLOutputter
类名称:XMLOutputter
方法名:attribute
暂无
代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs
/**
* Generate a XML block as such, <item label="Node" value="hostname"
* link="http://hostname:50070" />
*/
private static void toXmlItemBlockWithLink(XMLOutputter doc, String value,
URL url, String label) throws IOException {
doc.startTag("item");
doc.attribute("label", label);
doc.attribute("value", value);
doc.attribute("link", url.toString());
doc.endTag(); // item
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/** Write that object to xml output. */
public static void write(XMLOutputter xml, MD5MD5CRC32FileChecksum that
) throws IOException {
xml.startTag(MD5MD5CRC32FileChecksum.class.getName());
if (that != null) {
xml.attribute("bytesPerCRC", "" + that.bytesPerCRC);
xml.attribute("crcPerBlock", "" + that.crcPerBlock);
xml.attribute("md5", "" + that.md5);
}
xml.endTag();
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* Generate a XML block as such, <item label="Node" value="hostname"
* link="http://hostname:50070" />
*/
private static void toXmlItemBlockWithLink(XMLOutputter doc, String value,
URL url, String label) throws IOException {
doc.startTag("item");
doc.attribute("label", label);
doc.attribute("value", value);
doc.attribute("link", url.toString());
doc.endTag(); // item
}
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
/** Write that object to xml output. */
public static void write(XMLOutputter xml, MD5MD5CRC32FileChecksum that
) throws IOException {
xml.startTag(MD5MD5CRC32FileChecksum.class.getName());
if (that != null) {
xml.attribute("bytesPerCRC", "" + that.bytesPerCRC);
xml.attribute("crcPerBlock", "" + that.crcPerBlock);
xml.attribute("md5", "" + that.md5);
}
xml.endTag();
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/** Write that object to xml output. */
public static void write(XMLOutputter xml, MD5MD5CRC32FileChecksum that
) throws IOException {
xml.startTag(MD5MD5CRC32FileChecksum.class.getName());
if (that != null) {
xml.attribute("bytesPerCRC", "" + that.bytesPerCRC);
xml.attribute("crcPerBlock", "" + that.crcPerBlock);
xml.attribute("crcType", ""+ that.getCrcType().name());
xml.attribute("md5", "" + that.md5);
}
xml.endTag();
}
代码示例来源:origin: io.hops/hadoop-common
/** Write that object to xml output. */
public static void write(XMLOutputter xml, MD5MD5CRC32FileChecksum that
) throws IOException {
xml.startTag(MD5MD5CRC32FileChecksum.class.getName());
if (that != null) {
xml.attribute("bytesPerCRC", "" + that.bytesPerCRC);
xml.attribute("crcPerBlock", "" + that.crcPerBlock);
xml.attribute("crcType", ""+ that.getCrcType().name());
xml.attribute("md5", "" + that.md5);
}
xml.endTag();
}
代码示例来源:origin: ch.cern.hadoop/hadoop-common
/** Write that object to xml output. */
public static void write(XMLOutputter xml, MD5MD5CRC32FileChecksum that
) throws IOException {
xml.startTag(MD5MD5CRC32FileChecksum.class.getName());
if (that != null) {
xml.attribute("bytesPerCRC", "" + that.bytesPerCRC);
xml.attribute("crcPerBlock", "" + that.crcPerBlock);
xml.attribute("crcType", ""+ that.getCrcType().name());
xml.attribute("md5", "" + that.md5);
}
xml.endTag();
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-common
/** Write that object to xml output. */
public static void write(XMLOutputter xml, MD5MD5CRC32FileChecksum that
) throws IOException {
xml.startTag(MD5MD5CRC32FileChecksum.class.getName());
if (that != null) {
xml.attribute("bytesPerCRC", "" + that.bytesPerCRC);
xml.attribute("crcPerBlock", "" + that.crcPerBlock);
xml.attribute("crcType", ""+ that.getCrcType().name());
xml.attribute("md5", "" + that.md5);
}
xml.endTag();
}
代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs
/**
* Generate a XML block as such, <item label=key value=value/>
*/
private static void toXmlItemBlock(XMLOutputter doc, String key, String value)
throws IOException {
doc.startTag("item");
doc.attribute("label", key);
doc.attribute("value", value);
doc.endTag();
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* Generate a XML block as such, <item label=key value=value/>
*/
private static void toXmlItemBlock(XMLOutputter doc, String key, String value)
throws IOException {
doc.startTag("item");
doc.attribute("label", key);
doc.attribute("value", value);
doc.endTag();
}
代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs
/** Write the object to XML format */
protected void writeXml(Exception except, String path, XMLOutputter doc)
throws IOException {
doc.startTag(RemoteException.class.getSimpleName());
doc.attribute("path", path);
if (except instanceof RemoteException) {
doc.attribute("class", ((RemoteException) except).getClassName());
} else {
doc.attribute("class", except.getClass().getName());
}
String msg = except.getLocalizedMessage();
int i = msg.indexOf("\n");
if (i >= 0) {
msg = msg.substring(0, i);
}
doc.attribute("message", msg.substring(msg.indexOf(":") + 1).trim());
doc.endTag();
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/** Write the object to XML format */
public void writeXml(String path, XMLOutputter doc) throws IOException {
doc.startTag(RemoteException.class.getSimpleName());
doc.attribute("path", path);
doc.attribute("class", getClassName());
String msg = getLocalizedMessage();
int i = msg.indexOf("\n");
if (i >= 0) {
msg = msg.substring(0, i);
}
doc.attribute("message", msg.substring(msg.indexOf(":") + 1).trim());
doc.endTag();
}
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
/** Write the object to XML format */
public void writeXml(String path, XMLOutputter doc) throws IOException {
doc.startTag(RemoteException.class.getSimpleName());
doc.attribute("path", path);
doc.attribute("class", getClassName());
String msg = getLocalizedMessage();
int i = msg.indexOf("\n");
if (i >= 0) {
msg = msg.substring(0, i);
}
doc.attribute("message", msg.substring(msg.indexOf(":") + 1).trim());
doc.endTag();
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/** Write the object to XML format */
protected void writeXml(Exception except, String path, XMLOutputter doc)
throws IOException {
doc.startTag(RemoteException.class.getSimpleName());
doc.attribute("path", path);
if (except instanceof RemoteException) {
doc.attribute("class", ((RemoteException) except).getClassName());
} else {
doc.attribute("class", except.getClass().getName());
}
String msg = except.getLocalizedMessage();
int i = msg.indexOf("\n");
if (i >= 0) {
msg = msg.substring(0, i);
}
doc.attribute("message", msg.substring(msg.indexOf(":") + 1).trim());
doc.endTag();
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/**
* Write a node to output.
* Node information includes path, modification, permission, owner and group.
* For files, it also includes size, replication and block-size.
*/
static void writeInfo(String parent, HdfsFileStatus i, XMLOutputter doc) throws IOException {
final SimpleDateFormat ldf = df.get();
doc.startTag(i.isDir() ? "directory" : "file");
doc.attribute("path", i.getFullPath(new Path(parent)).toUri().getPath());
doc.attribute("modified", ldf.format(new Date(i.getModificationTime())));
doc.attribute("accesstime", ldf.format(new Date(i.getAccessTime())));
if (!i.isDir()) {
doc.attribute("size", String.valueOf(i.getLen()));
doc.attribute("replication", String.valueOf(i.getReplication()));
doc.attribute("blocksize", String.valueOf(i.getBlockSize()));
}
doc.attribute("permission", (i.isDir()? "d": "-") + i.getPermission());
doc.attribute("owner", i.getOwner());
doc.attribute("group", i.getGroup());
doc.endTag();
}
代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs
/**
* Write a node to output.
* Node information includes path, modification, permission, owner and group.
* For files, it also includes size, replication and block-size.
*/
static void writeInfo(final Path fullpath, final HdfsFileStatus i,
final XMLOutputter doc) throws IOException {
final SimpleDateFormat ldf = df.get();
doc.startTag(i.isDir() ? "directory" : "file");
doc.attribute("path", ServletUtil.encodePath(fullpath.toUri().getPath()));
doc.attribute("modified", ldf.format(new Date(i.getModificationTime())));
doc.attribute("accesstime", ldf.format(new Date(i.getAccessTime())));
if (!i.isDir()) {
doc.attribute("size", String.valueOf(i.getLen()));
doc.attribute("replication", String.valueOf(i.getReplication()));
doc.attribute("blocksize", String.valueOf(i.getBlockSize()));
}
doc.attribute("permission", (i.isDir()? "d": "-") + i.getPermission());
doc.attribute("owner", i.getOwner());
doc.attribute("group", i.getGroup());
doc.endTag();
}
代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs
/**
* create the XML for exceptions that we encountered when connecting to
* namenode.
*/
private static void createNamenodeExceptionMsg(XMLOutputter doc,
Map<String, Exception> exceptionMsg) throws IOException {
if (exceptionMsg.size() > 0) {
doc.startTag("unreportedNamenodes");
for (Map.Entry<String, Exception> m : exceptionMsg.entrySet()) {
doc.startTag("node");
doc.attribute("name", m.getKey());
doc.attribute("exception",
StringUtils.stringifyException(m.getValue()));
doc.endTag();// node
}
doc.endTag(); // unreportedNamnodes
}
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* create the XML for exceptions that we encountered when connecting to
* namenode.
*/
private static void createNamenodeExceptionMsg(XMLOutputter doc,
Map<String, Exception> exceptionMsg) throws IOException {
if (exceptionMsg.size() > 0) {
doc.startTag("unreportedNamenodes");
for (Map.Entry<String, Exception> m : exceptionMsg.entrySet()) {
doc.startTag("node");
doc.attribute("name", m.getKey());
doc.attribute("exception",
StringUtils.stringifyException(m.getValue()));
doc.endTag();// node
}
doc.endTag(); // unreportedNamnodes
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs
/**
* create XML block from general exception.
*/
private static void createGeneralException(XMLOutputter doc,
String clusterid, String eMsg) throws IOException {
doc.startTag("cluster");
doc.attribute("clusterId", clusterid);
doc.startTag("message");
doc.startTag("item");
doc.attribute("msg", eMsg);
doc.endTag(); // item
doc.endTag(); // message
doc.endTag(); // cluster
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* create XML block from general exception.
*/
private static void createGeneralException(XMLOutputter doc,
String clusterid, String eMsg) throws IOException {
doc.startTag("cluster");
doc.attribute("clusterId", clusterid);
doc.startTag("message");
doc.startTag("item");
doc.attribute("msg", eMsg);
doc.endTag(); // item
doc.endTag(); // message
doc.endTag(); // cluster
}
我使用 XMLOutputter 编写 xml 文件,然后在 android 中使用它。写入文件时,string Text 写成 <u>Text<u> 我从数据库中读取“Tex
我正在编写将由 Windows WebFolder 使用的 XML(用于安装 WebDAV 卷)。 WebFolder 要求所有元素都有一个前缀,而不是这样: 我需要这样做:
本文整理了Java中org.znerd.xmlenc.XMLOutputter.getWriter()方法的一些代码示例,展示了XMLOutputter.getWriter()的具体用法。这些代码示例
本文整理了Java中org.znerd.xmlenc.XMLOutputter.attribute()方法的一些代码示例,展示了XMLOutputter.attribute()的具体用法。这些代码示例
本文整理了Java中org.znerd.xmlenc.XMLOutputter.declaration()方法的一些代码示例,展示了XMLOutputter.declaration()的具体用法。这些
本文整理了Java中org.znerd.xmlenc.XMLOutputter.endTag()方法的一些代码示例,展示了XMLOutputter.endTag()的具体用法。这些代码示例主要来源于G
本文整理了Java中org.znerd.xmlenc.XMLOutputter.endDocument()方法的一些代码示例,展示了XMLOutputter.endDocument()的具体用法。这些
本文整理了Java中org.znerd.xmlenc.XMLOutputter.()方法的一些代码示例,展示了XMLOutputter.()的具体用法。这些代码示例主要来源于Github/Stacko
本文整理了Java中org.znerd.xmlenc.XMLOutputter.startTag()方法的一些代码示例,展示了XMLOutputter.startTag()的具体用法。这些代码示例主要
我已经看到了有关同一问题的其他问题,但我仍然收到错误。 Hier 是我尝试修改 exosting xml 文件的一小部分代码。但它修改了文本中的一些字符。 import org.jdom2.Docum
我是一名优秀的程序员,十分优秀!