gpt4 book ai didi

com.google.gdata.util.common.xml.XmlWriter.innerXml()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 13:40:40 27 4
gpt4 key购买 nike

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

XmlWriter.innerXml介绍

[英]Writes inner XML provided as a string. Used to write out XML blobs.
[中]写入作为字符串提供的内部XML。用于写出XML blob。

代码示例

代码示例来源:origin: com.google.gdata/gdata-java-client

/**
 * @return a plain-text representation of this text construct,
 * or {@code null} in case of error
 */
@Override
public String getPlainText() {
 try {
  StringWriter sw = new StringWriter();
  XmlWriter xw = new XmlWriter(sw);
  xw.innerXml(xhtml.getBlob());
  return HtmlToText.htmlToPlainText(sw.toString());
 } catch (IOException e) {
  // IOException isn't very meaningful to callers, so it's better to
  // return null in this case.
  return null;
 }
}

代码示例来源:origin: com.google.gdata/gdata-core-1.0

/** Generates an element closing tag containing an XML blob. */
 public static void endElement(XmlWriter w,
                XmlNamespace namespace,
                String elementName,
                XmlBlob xml) throws IOException {

  if (xml != null && xml.getBlob() != null) {
   w.innerXml(xml.getBlob());
  }

  w.endElement(namespace, elementName);
 }
}

代码示例来源:origin: com.google.gdata/gdata-core-1.0

/**
 * @return a plain-text representation of this text construct,
 *         or {@code null} if there is no text content available.
 */
@Override
public String getPlainText() {
 if (xhtml == null) {
  return null;
 }
 try {
  StringWriter sw = new StringWriter();
  XmlWriter xw = new XmlWriter(sw);
  xw.innerXml(xhtml.getBlob());
  return HtmlToText.htmlToPlainText(sw.toString());
 } catch (IOException e) {
  // IOException isn't very meaningful to callers, so it's better to
  // return null in this case.
  return null;
 }
}

代码示例来源:origin: com.mulesoft.google/google-api-gdata

/**
 * @return a plain-text representation of this text construct,
 *         or {@code null} if there is no text content available.
 */
@Override
public String getPlainText() {
 if (xhtml == null) {
  return null;
 }
 try {
  StringWriter sw = new StringWriter();
  XmlWriter xw = new XmlWriter(sw);
  xw.innerXml(xhtml.getBlob());
  return HtmlToText.htmlToPlainText(sw.toString());
 } catch (IOException e) {
  // IOException isn't very meaningful to callers, so it's better to
  // return null in this case.
  return null;
 }
}

代码示例来源:origin: com.mulesoft.google/google-api-gdata

/** Generates an element closing tag containing an XML blob. */
 public static void endElement(XmlWriter w,
                XmlNamespace namespace,
                String elementName,
                XmlBlob xml) throws IOException {

  if (xml != null && xml.getBlob() != null) {
   w.innerXml(xml.getBlob());
  }

  w.endElement(namespace, elementName);
 }
}

代码示例来源:origin: com.google.gdata/gdata-java-client

/** Generates an element closing tag containing an XML blob. */
 public static void endElement(XmlWriter w,
                XmlNamespace namespace,
                String elementName,
                XmlBlob xml) throws IOException {

  if (xml != null && xml.getBlob() != null) {
   w.innerXml(xml.getBlob());
  }

  w.endElement(namespace, elementName);
 }
}

代码示例来源:origin: com.google.gdata/gdata-core-1.0

/**
 * Generates XML corresponding to extended properties. Implementations in
 * extended classes should always call the base class to allow for nested
 * extensions.
 * 
 * @param w Output writer.
 * 
 * @param extProfile Extension profile for use by nested extensions.
 * 
 * @throws IOException
 */
protected void generateExtensions(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 for (Extension ext : nonRepeatingExtensionMap.values()) {
  ext.generate(w, extProfile);
 }
 for (List<Extension> extList : repeatingExtensionMap.values()) {
  w.startRepeatingElement();
  for (Extension ext : extList) {
   ext.generate(w, extProfile);
  }
  w.endRepeatingElement();
 }
 if (xmlBlob != null) {
  w.innerXml(xmlBlob.getBlob());
 }
}

代码示例来源:origin: com.mulesoft.google/google-api-gdata

/**
 * Generates XML corresponding to extended properties. Implementations in
 * extended classes should always call the base class to allow for nested
 * extensions.
 * 
 * @param w Output writer.
 * 
 * @param extProfile Extension profile for use by nested extensions.
 * 
 * @throws IOException
 */
protected void generateExtensions(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 for (Extension ext : nonRepeatingExtensionMap.values()) {
  ext.generate(w, extProfile);
 }
 for (List<Extension> extList : repeatingExtensionMap.values()) {
  w.startRepeatingElement();
  for (Extension ext : extList) {
   ext.generate(w, extProfile);
  }
  w.endRepeatingElement();
 }
 if (xmlBlob != null) {
  w.innerXml(xmlBlob.getBlob());
 }
}

代码示例来源:origin: com.google.gdata/gdata-java-client

/**
 * Generates XML corresponding to extended properties. Implementations in
 * extended classes should always call the base class to allow for nested
 * extensions.
 * 
 * @param w Output writer.
 * 
 * @param extProfile Extension profile for use by nested extensions.
 * 
 * @throws IOException
 */
protected void generateExtensions(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 for (Extension ext : nonRepeatingExtensionMap.values()) {
  ext.generate(w, extProfile);
 }
 for (List<Extension> extList : repeatingExtensionMap.values()) {
  w.startRepeatingElement();
  for (Extension ext : extList) {
   ext.generate(w, extProfile);
  }
  w.endRepeatingElement();
 }
 if (xmlBlob != null) {
  w.innerXml(xmlBlob.getBlob());
 }
}

代码示例来源:origin: com.google.gdata/gdata-core-1.0

xw.innerXml(xhtml.getBlob());

代码示例来源:origin: com.mulesoft.google/google-api-gdata

xw.innerXml(xhtml.getBlob());

代码示例来源:origin: com.google.gdata/gdata-java-client

xw.innerXml(xhtml.getBlob());

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