gpt4 book ai didi

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

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

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

XmlWriter.currentElement介绍

[英]Returns the current element, or null if no element is being written.
[中]返回当前元素,如果没有写入元素,则返回null。

代码示例

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

/**
 * Indicates that the series of repeating elements have been completely
 * written.
 */
@SuppressWarnings("unused")
public void endRepeatingElement() throws IOException {
 currentElement().repeatingCount = Element.NOT_REPEATING;
}

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

/**
 * Indicates that the series of repeating elements have been completely
 * written.
 */
@SuppressWarnings("unused")
public void endRepeatingElement() throws IOException {
 currentElement().repeatingCount = Element.NOT_REPEATING;
}

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

/**
 * Indicates that the series of repeating elements have been completely
 * written.
 */
@SuppressWarnings("unused")
public void endRepeatingElement() throws IOException {
 currentElement().repeatingCount = Element.NOT_REPEATING;
}

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

/**
 * Returns true if the feature is enabled and if the current element
 * does not contain unformatted children.
 */
private boolean isPrettyPrintingEnabled() {
 return flags.contains(WriterFlags.PRETTY_PRINT)
   && !currentElement().unformattedChildren;
}

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

/**
 * Returns true if the feature is enabled and if the current element
 * does not contain unformatted children.
 */
private boolean isPrettyPrintingEnabled() {
 return flags.contains(WriterFlags.PRETTY_PRINT)
   && !currentElement().unformattedChildren;
}

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

/**
 * Indicates that a series of repeating elements are about to
 * be written.
 */
@SuppressWarnings("unused")
public void startRepeatingElement() throws IOException {
 Element currentElement = currentElement();
 if (currentElement.repeatingCount != Element.NOT_REPEATING) {
  throw new IllegalStateException("Existing repeating element is active");
 }
 currentElement.repeatingCount = 0;
}

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

/**
 * Indicates that a series of repeating elements are about to
 * be written.
 */
@SuppressWarnings("unused")
public void startRepeatingElement() throws IOException {
 Element currentElement = currentElement();
 if (currentElement.repeatingCount != Element.NOT_REPEATING) {
  throw new IllegalStateException("Existing repeating element is active");
 }
 currentElement.repeatingCount = 0;
}

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

/**
 * Indicates that a series of repeating elements are about to
 * be written.
 */
@SuppressWarnings("unused")
public void startRepeatingElement() throws IOException {
 Element currentElement = currentElement();
 if (currentElement.repeatingCount != Element.NOT_REPEATING) {
  throw new IllegalStateException("Existing repeating element is active");
 }
 currentElement.repeatingCount = 0;
}

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

/**
 * Returns true if the feature is enabled and if the current element
 * does not contain unformatted children.
 */
private boolean isPrettyPrintingEnabled() {
 return flags.contains(WriterFlags.PRETTY_PRINT)
   && !currentElement().unformattedChildren;
}

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

/**
  * Writes a string without XML entity escaping.
  *
  * @param s the raw content to write without escaping.
  * @throws IOException thrown by the underlying writer.
  */
 public void writeUnescaped(String s) throws IOException {
  endOpenTag();
  currentElement().unformattedChildren = true;
  writer.write(s);
 }
}

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

/**
 * Ends the start tag for an element.
 */
protected void endOpenTag() throws IOException {
 Element element = currentElement();
 if (!element.openTagEnded) {
  writeOpenTagEnd();
  element.openTagEnded = true;
 }
}

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

/**
  * Writes a string without XML entity escaping.
  *
  * @param s the raw content to write without escaping.
  * @throws IOException thrown by the underlying writer.
  */
 public void writeUnescaped(String s) throws IOException {
  endOpenTag();
  currentElement().unformattedChildren = true;
  writer.write(s);
 }
}

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

/**
 * Ends the current element. It is expected to be on top of the stack.
 *
 * @param   namespace element namespace.
 * @param   name element name.
 */
public void endElement(XmlNamespace namespace, String name) 
  throws IOException {
 Element element = currentElement();
 assert namespace == null || element.nsUri.equals(namespace.uri);
 assert element.name.equals(name);
 endElement();
}

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

/**
 * Ends the start tag for an element.
 */
protected void endOpenTag() throws IOException {
 Element element = currentElement();
 if (!element.openTagEnded) {
  writeOpenTagEnd();
  element.openTagEnded = true;
 }
}

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

/**
 * Ends the start tag for an element.
 */
protected void endOpenTag() throws IOException {
 Element element = currentElement();
 if (!element.openTagEnded) {
  writeOpenTagEnd();
  element.openTagEnded = true;
 }
}

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

/**
  * Writes a string without XML entity escaping.
  *
  * @param s the raw content to write without escaping.
  * @throws IOException thrown by the underlying writer.
  */
 public void writeUnescaped(String s) throws IOException {
  endOpenTag();
  currentElement().unformattedChildren = true;
  writer.write(s);
 }
}

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

/**
 * Ends the current element. It is expected to be on top of the stack.
 *
 * @param   namespace element namespace.
 * @param   name element name.
 */
public void endElement(XmlNamespace namespace, String name) 
  throws IOException {
 Element element = currentElement();
 assert namespace == null || element.nsUri.equals(namespace.uri);
 assert element.name.equals(name);
 endElement();
}

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

/**
 * Ends the current element. It is expected to be on top of the stack.
 *
 * @param   namespace element namespace.
 * @param   name element name.
 */
public void endElement(XmlNamespace namespace, String name) 
  throws IOException {
 Element element = currentElement();
 assert namespace == null || element.nsUri.equals(namespace.uri);
 assert element.name.equals(name);
 endElement();
}

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

/**
 * Emits character data subject to XML escaping.
 *
 * @param s string to emit. Can be {@code null}.
 * @throws IOException thrown by the underlying writer.
 */
public void characters(String s) throws IOException {
 if (s == null) {
  return;
 }
 endOpenTag();
 currentElement().unformattedChildren = true;
 writer.write(StringUtil.xmlContentEscape(s));
}

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

/**
 * Ends the current element. No integrity checking is performed.
 */
public void endElement() throws IOException {
 Element element = currentElement();
 writeCloseTag(element.nsAlias, element.name);
 defaultNamespace = element.enclosingDefaultNamespace;
 elementStack.pop();
 // Write the footer if we're down to just the dummy element.
 if (elementStack.size() == 1) {
  if (this.shouldWriteHeaderAndFooter()) {
   writeFooter();
  }
  writeEndOutput();
 }
}

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