gpt4 book ai didi

org.restlet.ext.xml.XmlWriter.dataElement()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 14:05:05 27 4
gpt4 key购买 nike

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

XmlWriter.dataElement介绍

[英]Write an element with character data content but no attributes or Namespace URI.

This is a convenience method to write a complete element with character data content, including the start tag and end tag. The method provides an empty string for the Namespace URI, and empty string for the qualified name, and an empty attribute list.

This method invokes #startElement(String,String,String,Attributes), followed by #characters(String), followed by #endElement(String,String,String).
[中]使用字符数据内容编写元素,但不使用属性或命名空间URI。
这是一种方便的方法,可以用字符数据内容编写完整的元素,包括开始标记和结束标记。该方法为名称空间URI提供空字符串,为限定名称提供空字符串,并提供空属性列表。
这个方法调用#startElement(String,String,String,Attributes),然后调用#characters(String),然后调用#endElement(String,String,String)。

代码示例

代码示例来源:origin: org.restlet.jee/org.restlet.ext.xml

dataElement(uri, localName, "", this.EMPTY_ATTS, content);

代码示例来源:origin: org.restlet.android/org.restlet.ext.xml

dataElement("", localName, "", this.EMPTY_ATTS, content);

代码示例来源:origin: org.restlet/org.restlet.ext.xml

dataElement(uri, localName, "", this.EMPTY_ATTS, content);

代码示例来源:origin: org.restlet.android/org.restlet.ext.xml

dataElement(uri, localName, "", this.EMPTY_ATTS, content);

代码示例来源:origin: org.restlet.jee/org.restlet.ext.xml

dataElement("", localName, "", this.EMPTY_ATTS, content);

代码示例来源:origin: org.restlet/org.restlet.ext.xml

dataElement("", localName, "", this.EMPTY_ATTS, content);

代码示例来源:origin: org.restlet.jee/org.restlet.ext.atom

writer.dataElement(ATOM_NAMESPACE, "title", getTitle());
writer.dataElement(APP_NAMESPACE, "accept", sb.toString());

代码示例来源:origin: org.restlet.jee/org.restlet.ext.atom

/**
 * Writes the current object as an XML element using the given SAX writer.
 * 
 * @param writer
 *            The SAX writer.
 * @param localName
 *            The local name of the element.
 * @throws SAXException
 */
public void writeElement(XmlWriter writer, String localName)
    throws SAXException {
  writer.startElement(ATOM_NAMESPACE, localName);
  if (getEmail() != null) {
    writer.dataElement(ATOM_NAMESPACE, "email", getEmail());
  }
  if (getName() != null) {
    writer.dataElement(ATOM_NAMESPACE, "name", getName());
  }
  if ((getUri() != null) && (getUri().toString() != null)) {
    writer.dataElement(ATOM_NAMESPACE, "uri", getUri().toString());
  }
  writer.endElement(ATOM_NAMESPACE, localName);
}

代码示例来源:origin: org.restlet.android/org.restlet.ext.atom

/**
 * Writes the current object as an XML element using the given SAX writer.
 * 
 * @param writer
 *            The SAX writer.
 * @param localName
 *            The local name of the element.
 * @throws SAXException
 */
public void writeElement(XmlWriter writer, String localName)
    throws SAXException {
  writer.startElement(ATOM_NAMESPACE, localName);
  if (getEmail() != null) {
    writer.dataElement(ATOM_NAMESPACE, "email", getEmail());
  }
  if (getName() != null) {
    writer.dataElement(ATOM_NAMESPACE, "name", getName());
  }
  if ((getUri() != null) && (getUri().toString() != null)) {
    writer.dataElement(ATOM_NAMESPACE, "uri", getUri().toString());
  }
  writer.endElement(ATOM_NAMESPACE, localName);
}

代码示例来源:origin: org.restlet.android/org.restlet.ext.atom

writer.dataElement(ATOM_NAMESPACE, "title", getTitle());
writer.dataElement(APP_NAMESPACE, "accept", sb.toString());

代码示例来源:origin: org.restlet.jee/org.restlet.ext.atom

writer.dataElement(ATOM_NAMESPACE, localName, null, attributes,
      getContent());
} else {

代码示例来源:origin: org.restlet.android/org.restlet.ext.atom

writer.dataElement(ATOM_NAMESPACE, localName, null, attributes,
      getContent());
} else {

代码示例来源:origin: org.restlet.jee/org.restlet.ext.atom

/**
 * Writes the current object as an XML element using the given SAX writer.
 * 
 * @param writer
 *            The SAX writer.
 * @throws SAXException
 */
public void writeElement(XmlWriter writer) throws SAXException {
  final AttributesImpl attributes = new AttributesImpl();
  if ((getUri() != null) && (getUri().toString() != null)) {
    attributes.addAttribute("", "uri", null, "atomURI", getUri()
        .toString());
  }
  if (getVersion() != null) {
    attributes.addAttribute("", "version", null, "text", getVersion());
  }
  if (getName() != null) {
    writer.dataElement(ATOM_NAMESPACE, "generator", null, attributes,
        getName());
  } else {
    writer.emptyElement(ATOM_NAMESPACE, "generator", null, attributes);
  }
}

代码示例来源:origin: org.restlet.android/org.restlet.ext.atom

/**
 * Writes the current object as an XML element using the given SAX writer.
 * 
 * @param writer
 *            The SAX writer.
 * @throws SAXException
 */
public void writeElement(XmlWriter writer) throws SAXException {
  final AttributesImpl attributes = new AttributesImpl();
  if ((getUri() != null) && (getUri().toString() != null)) {
    attributes.addAttribute("", "uri", null, "atomURI", getUri()
        .toString());
  }
  if (getVersion() != null) {
    attributes.addAttribute("", "version", null, "text", getVersion());
  }
  if (getName() != null) {
    writer.dataElement(ATOM_NAMESPACE, "generator", null, attributes,
        getName());
  } else {
    writer.emptyElement(ATOM_NAMESPACE, "generator", null, attributes);
  }
}

代码示例来源:origin: org.restlet.jee/org.restlet.ext.atom

/**
 * Writes the current object as an XML element using the given SAX writer.
 * 
 * @param writer
 *            The SAX writer.
 * @throws SAXException
 */
public void writeElement(XmlWriter writer) throws SAXException {
  writer.startElement(APP_NAMESPACE, "workspace");
  if (getTitle() != null) {
    writer.dataElement(ATOM_NAMESPACE, "title", getTitle());
  }
  for (final Collection collection : getCollections()) {
    collection.writeElement(writer);
  }
  writer.endElement(APP_NAMESPACE, "workspace");
}

代码示例来源:origin: org.restlet.android/org.restlet.ext.atom

/**
 * Writes the current object as an XML element using the given SAX writer.
 * 
 * @param writer
 *            The SAX writer.
 * @throws SAXException
 */
public void writeElement(XmlWriter writer) throws SAXException {
  writer.startElement(APP_NAMESPACE, "workspace");
  if (getTitle() != null) {
    writer.dataElement(ATOM_NAMESPACE, "title", getTitle());
  }
  for (final Collection collection : getCollections()) {
    collection.writeElement(writer);
  }
  writer.endElement(APP_NAMESPACE, "workspace");
}

代码示例来源:origin: org.restlet.jee/org.restlet.ext.atom

writer.dataElement(ATOM_NAMESPACE, "icon", getIcon().toString());
writer.dataElement(ATOM_NAMESPACE, "id", null,
    new AttributesImpl(), getId());
writer.dataElement(ATOM_NAMESPACE, "logo", getLogo().toString());

代码示例来源:origin: org.restlet.jee/org.restlet.ext.atom

writer.dataElement(ATOM_NAMESPACE, "icon", getIcon().toString());
writer.dataElement(ATOM_NAMESPACE, "id", getId());
writer.dataElement(ATOM_NAMESPACE, "logo", getLogo().toString());

代码示例来源:origin: org.restlet.jee/org.restlet.ext.atom

writer.dataElement(ATOM_NAMESPACE, "id", getId());
writer.dataElement(ATOM_NAMESPACE, "summary", getSummary());

代码示例来源:origin: org.restlet.android/org.restlet.ext.atom

writer.dataElement(ATOM_NAMESPACE, "id", getId());
writer.dataElement(ATOM_NAMESPACE, "summary", getSummary());

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com