gpt4 book ai didi

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

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

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

XmlWriter.startElement介绍

[英]Starts an element. This element can be a parent to other elements.
[中]开始一个元素。此元素可以是其他元素的父元素。

代码示例

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

/**
 * Starts an element. This element can be a parent to other elements.
 *
 * @param name element name.
 */
public void startElement(String name) throws IOException {
 startElement(null, name, null, null);
}

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

/**
 * Starts an element. This element can be a parent to other elements.
 *
 * @param name element name.
 */
public void startElement(String name) throws IOException {
 startElement(null, name, null, null);
}

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

/**
 * Starts an element. This element can be a parent to other elements.
 *
 * @param name element name.
 */
public void startElement(String name) throws IOException {
 startElement(null, name, null, null);
}

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

/**
 * Emits a simple element (without child elements).
 *
 * @param   namespace element namespace.
 * @param   name element name.
 * @param   attrs attributes. Can be {@code null}.
 * @param   value element value. Can be {@code null}.
 * @throws  IOException thrown by the underlying writer.
 */
public void simpleElement(XmlNamespace namespace, String name,
  List<Attribute> attrs, String value) throws IOException {
 startElement(namespace, name, attrs, null);
 characters(value);
 endElement(namespace, name);
}

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

@Override
public void generate(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 w.startElement(Namespaces.EXIF_NAMESPACE, "tags", null, null);
 Collection<ExifTag> fields = getExifTags();
 for (ExifTag field : fields) {
  field.generate(w, extProfile);
 }
 w.endElement();
}

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

@Override
public void generate(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 w.startElement(Namespaces.EXIF_NAMESPACE, "tags", null, null);
 Collection<ExifTag> fields = getExifTags();
 for (ExifTag field : fields) {
  field.generate(w, extProfile);
 }
 w.endElement();
}

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

@Override
public void generate(XmlWriter writer, ExtensionProfile profile)
  throws IOException {
 ExtensionDescription desc;
 
 desc = ExtensionDescription.getDefaultDescription(this.getClass());
 writer.startElement(desc.getNamespace(), desc.getLocalName(), null, null);
 generateExtensions(writer, profile);
 writer.endElement();
}

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

@Override
public void generate(XmlWriter writer, ExtensionProfile profile)
  throws IOException {
 ExtensionDescription desc;
 desc = ExtensionDescription.getDefaultDescription(this.getClass());
 writer.startElement(desc.getNamespace(), desc.getLocalName(), null, null);
 generateExtensions(writer, profile);
 writer.endElement();
}

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

@Override
public void generate(XmlWriter writer, ExtensionProfile profile)
  throws IOException {
 ExtensionDescription desc;
 desc = ExtensionDescription.getDefaultDescription(this.getClass());
 writer.startElement(desc.getNamespace(), desc.getLocalName(), null, null);
 generateExtensions(writer, profile);
 writer.endElement();
}

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

@Override
public void generate(XmlWriter writer, ExtensionProfile profile)
  throws IOException {
 ExtensionDescription desc;
 
 desc = ExtensionDescription.getDefaultDescription(this.getClass());
 writer.startElement(desc.getNamespace(), desc.getLocalName(), null, null);
 generateExtensions(writer, profile);
 writer.endElement();
}

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

public void generate(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 if (impressions.getTotal() == 0 && clicks.getTotal() == 0
   && pageViews.getTotal() == 0) {
  // Nothing to generate
  return;
 }
 w.startElement(GoogleBaseNamespaces.GM, "stats", null, null);
 impressions.generate(w, "impressions");
 clicks.generate(w, "clicks");
 pageViews.generate(w, "page_views");
 w.endElement();
}

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

public void generate(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 if (impressions.getTotal() == 0 && clicks.getTotal() == 0
   && pageViews.getTotal() == 0) {
  // Nothing to generate
  return;
 }
 w.startElement(GoogleBaseNamespaces.GM, "stats", null, null);
 impressions.generate(w, "impressions");
 clicks.generate(w, "clicks");
 pageViews.generate(w, "page_views");
 w.endElement();
}

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

public boolean startElement(XmlWriter xw, Element parent, Element e,
  ElementMetadata<?, ?> metadata) throws IOException {
 Collection<XmlNamespace> namespaces = getNamespaces(parent, e, metadata);
 List<XmlWriter.Attribute> attrs = getAttributes(e, metadata);
 QName name = getName(e, metadata);
 xw.startElement(name.getNs(), name.getLocalName(), attrs, namespaces);
 return true;
}

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

public boolean startElement(XmlWriter xw, Element parent, Element e,
  ElementMetadata<?, ?> metadata) throws IOException {
 Collection<XmlNamespace> namespaces = getNamespaces(parent, e, metadata);
 List<XmlWriter.Attribute> attrs = getAttributes(e, metadata);
 QName name = getName(e, metadata);
 xw.startElement(name.getNs(), name.getLocalName(), attrs, namespaces);
 return true;
}

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

public boolean startElement(XmlWriter xw, Element parent, Element e,
  ElementMetadata<?, ?> metadata) throws IOException {
 Collection<XmlNamespace> namespaces = getNamespaces(parent, e, metadata);
 List<XmlWriter.Attribute> attrs = getAttributes(e, metadata);
 QName name = getName(e, metadata);
 xw.startElement(name.getNs(), name.getLocalName(), attrs, namespaces);
 return true;
}

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

/** Generates the atom representation for this tag. */
public void generateAtom(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 w.startElement(Namespaces.getAtomPubNs(), "control", null, null);
 if (isDraft()) {
  w.simpleElement(Namespaces.getAtomPubNs(), "draft", null, "yes");
 }
 generateExtensions(w, extProfile);
 w.endElement();
}

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

/** Generates the atom representation for this tag. */
public void generateAtom(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 w.startElement(Namespaces.getAtomPubNs(), "control", null, null);
 if (isDraft()) {
  w.simpleElement(Namespaces.getAtomPubNs(), "draft", null, "yes");
 }
 generateExtensions(w, extProfile);
 w.endElement();
}

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

/** Generates the atom representation for this tag. */
public void generateAtom(XmlWriter w, ExtensionProfile extProfile)
  throws IOException {
 w.startElement(Namespaces.getAtomPubNs(), "control", null, null);
 if (isDraft()) {
  w.simpleElement(Namespaces.getAtomPubNs(), "draft", null, "yes");
 }
 generateExtensions(w, extProfile);
 w.endElement();
}

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

private void generateAttribute(GoogleBaseAttribute attribute, XmlWriter xmlWriter) 
  throws IOException {
 String elementName = convertToElementName(attribute.getAttributeId().getName());
 xmlWriter.startElement(GoogleBaseNamespaces.G,
             elementName,
             getXmlAttributes(attribute),
             null);
 
 generateValue(attribute, xmlWriter);
 generateSubElements(attribute, xmlWriter);
 generateAdjustments(attribute, xmlWriter);
 generateSubAttributes(attribute, xmlWriter);
 xmlWriter.endElement();
}

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

private void generateAttribute(GoogleBaseAttribute attribute, XmlWriter xmlWriter) 
  throws IOException {
 String elementName = convertToElementName(attribute.getAttributeId().getName());
 xmlWriter.startElement(GoogleBaseNamespaces.G,
             elementName,
             getXmlAttributes(attribute),
             null);
 
 generateValue(attribute, xmlWriter);
 generateSubElements(attribute, xmlWriter);
 generateAdjustments(attribute, xmlWriter);
 generateSubAttributes(attribute, xmlWriter);
 xmlWriter.endElement();
}

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