gpt4 book ai didi

com.google.gdata.util.XmlBlob.endElement()方法的使用及代码示例

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

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

XmlBlob.endElement介绍

[英]Generates an element closing tag containing an XML blob.
[中]生成包含XML blob的元素结束标记。

代码示例

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

/**
 * Generates XML in the Atom format.
 *
 * @param   w
 *            output writer
 *
 * @param   elementName
 *            Atom element name
 *
 * @throws  IOException
 */
@Override
public void generateAtom(XmlWriter w,
             String elementName) throws IOException {
 ArrayList<XmlWriter.Attribute> attrs =
  new ArrayList<XmlWriter.Attribute>(2);
 attrs.add(new XmlWriter.Attribute("type", "xhtml"));
 if (lang != null) {
  attrs.add(new XmlWriter.Attribute("xml:lang", lang));
 }
 XmlBlob.startElement(w, Namespaces.atomNs, elementName, xhtml, attrs, null);
 XmlBlob.endElement(w, Namespaces.atomNs, elementName, xhtml);
}

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

/**
 * Generates XML in the Atom format.
 *
 * @param   w
 *            output writer
 *
 * @param   elementName
 *            Atom element name
 *
 * @throws  IOException
 */
@Override
public void generateAtom(XmlWriter w,
             String elementName) throws IOException {
 ArrayList<XmlWriter.Attribute> attrs =
  new ArrayList<XmlWriter.Attribute>(2);
 attrs.add(new XmlWriter.Attribute("type", "xhtml"));
 if (lang != null) {
  attrs.add(new XmlWriter.Attribute("xml:lang", lang));
 }
 XmlBlob.startElement(w, Namespaces.atomNs, elementName, xhtml, attrs, null);
 XmlBlob.endElement(w, Namespaces.atomNs, elementName, xhtml);
}

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

/**
 * Generates XML in the Atom format.
 *
 * @param   w
 *            output writer
 *
 * @param   elementName
 *            Atom element name
 *
 * @throws  IOException
 */
@Override
public void generateAtom(XmlWriter w,
             String elementName) throws IOException {
 ArrayList<XmlWriter.Attribute> attrs =
  new ArrayList<XmlWriter.Attribute>(2);
 attrs.add(new XmlWriter.Attribute("type", "xhtml"));
 if (lang != null) {
  attrs.add(new XmlWriter.Attribute("xml:lang", lang));
 }
 XmlBlob.startElement(w, Namespaces.atomNs, elementName, xhtml, attrs, null);
 XmlBlob.endElement(w, Namespaces.atomNs, elementName, xhtml);
}

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

/**
 * Reverses {@link #generateCumulativeXmlBlob(ExtensionProfile)}. This
 * operation overwrites the current contents of this extension point.
 */
public void parseCumulativeXmlBlob(XmlBlob blob,
  ExtensionProfile extProfile, 
  Class<? extends ExtensionPoint> extendedClass)
  throws IOException, ParseException {
 this.xmlBlob = new XmlBlob();
 nonRepeatingExtensionMap.clear();
 repeatingExtensionMap.clear();
 // Prepare a fake XML document from the blob.
 StringWriter sw = new StringWriter();
 XmlWriter w = new XmlWriter(sw);
 XmlBlob.startElement(w, null, "CUMULATIVE_BLOB", blob, null, null);
 XmlBlob.endElement(w, null, "CUMULATIVE_BLOB", blob);
 // Now parse it.
 StringReader sr = new StringReader(sw.toString());
 XmlParser parser = new XmlParser();
 parser.parse(sr, new CumulativeBlobHandler(extProfile, extendedClass), "",
   "CUMULATIVE_BLOB");
}

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

/**
 * Reverses {@link #generateCumulativeXmlBlob(ExtensionProfile)}. This
 * operation overwrites the current contents of this extension point.
 */
public void parseCumulativeXmlBlob(XmlBlob blob,
  ExtensionProfile extProfile, 
  Class<? extends ExtensionPoint> extendedClass)
  throws IOException, ParseException {
 this.xmlBlob = new XmlBlob();
 nonRepeatingExtensionMap.clear();
 repeatingExtensionMap.clear();
 // Prepare a fake XML document from the blob.
 StringWriter sw = new StringWriter();
 XmlWriter w = new XmlWriter(sw);
 XmlBlob.startElement(w, null, "CUMULATIVE_BLOB", blob, null, null);
 XmlBlob.endElement(w, null, "CUMULATIVE_BLOB", blob);
 // Now parse it.
 StringReader sr = new StringReader(sw.toString());
 XmlParser parser = new XmlParser();
 parser.parse(sr, new CumulativeBlobHandler(extProfile, extendedClass), "",
   "CUMULATIVE_BLOB");
}

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

/**
 * Reverses {@link #generateCumulativeXmlBlob(ExtensionProfile)}. This
 * operation overwrites the current contents of this extension point.
 */
public void parseCumulativeXmlBlob(XmlBlob blob,
  ExtensionProfile extProfile, 
  Class<? extends ExtensionPoint> extendedClass)
  throws IOException, ParseException {
 this.xmlBlob = new XmlBlob();
 nonRepeatingExtensionMap.clear();
 repeatingExtensionMap.clear();
 // Prepare a fake XML document from the blob.
 StringWriter sw = new StringWriter();
 XmlWriter w = new XmlWriter(sw);
 XmlBlob.startElement(w, null, "CUMULATIVE_BLOB", blob, null, null);
 XmlBlob.endElement(w, null, "CUMULATIVE_BLOB", blob);
 // Now parse it.
 StringReader sr = new StringReader(sw.toString());
 XmlParser parser = new XmlParser();
 parser.parse(sr, new CumulativeBlobHandler(extProfile, extendedClass), "",
   "CUMULATIVE_BLOB");
}

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

} else if (xml != null) {
 XmlBlob.startElement(w, Namespaces.atomNs, "content", xml, attrs, null);
 XmlBlob.endElement(w, Namespaces.atomNs, "content", xml);
} else {

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

} else if (xml != null) {
 XmlBlob.startElement(w, Namespaces.atomNs, "content", xml, attrs, null);
 XmlBlob.endElement(w, Namespaces.atomNs, "content", xml);
} else {

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

} else if (xml != null) {
 XmlBlob.startElement(w, Namespaces.atomNs, "content", xml, attrs, null);
 XmlBlob.endElement(w, Namespaces.atomNs, "content", xml);
} else {

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