gpt4 book ai didi

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

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

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

XmlBlob.getNamespaces介绍

暂无

代码示例

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

/** Ensures that the namespace from the QName is stored with the blob. */
private void ensureBlobNamespace(ElementHandler handler, String qName) {
 // Get the namespace.
 NamespaceDecl nsDecl = null;
 String alias = qName.substring(0, Math.max(0, qName.indexOf(":")));
 if (alias.equals("xml")) {
  // "xml:" doesn't need a declaration.
  return;
 }
 Stack<NamespaceDecl> mapping = namespaceMap.get(alias);
 if (mapping != null) {
  nsDecl = mapping.peek();
 }
 // The namespace might be null for a namespace-less element.
 assert alias.length() == 0 || nsDecl != null :
  "Namespace alias '" + alias + "' should be mapped in 'namespaceMap'.";
 // Make sure the namespace is described within the blob if it was
 // originally declared externally to it
 if (nsDecl != null && !nsDecl.inBlob && nsDecl.ns != null &&
   !handler.blobNamespaces.contains(alias)) {
  handler.blobNamespaces.add(alias);
  handler.xmlBlob.getNamespaces().add(
    new XmlNamespace(alias, nsDecl.ns.getUri()));
 }
}

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

/** Ensures that the namespace from the QName is stored with the blob. */
private void ensureBlobNamespace(ElementHandler handler, String qName) {
 // Get the namespace.
 NamespaceDecl nsDecl = null;
 String alias = qName.substring(0, Math.max(0, qName.indexOf(":")));
 if (alias.equals("xml")) {
  // "xml:" doesn't need a declaration.
  return;
 }
 Stack<NamespaceDecl> mapping = namespaceMap.get(alias);
 if (mapping != null) {
  nsDecl = mapping.peek();
 }
 // The namespace might be null for a namespace-less element.
 assert alias.length() == 0 || nsDecl != null :
  "Namespace alias '" + alias + "' should be mapped in 'namespaceMap'.";
 // Make sure the namespace is described within the blob if it was
 // originally declared externally to it
 if (nsDecl != null && !nsDecl.inBlob && nsDecl.ns != null &&
   !handler.blobNamespaces.contains(alias)) {
  handler.blobNamespaces.add(alias);
  handler.xmlBlob.getNamespaces().add(
    new XmlNamespace(alias, nsDecl.ns.getUri()));
 }
}

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

/** Ensures that the namespace from the QName is stored with the blob. */
private void ensureBlobNamespace(ElementHandler handler, String qName) {
 // Get the namespace.
 NamespaceDecl nsDecl = null;
 String alias = qName.substring(0, Math.max(0, qName.indexOf(":")));
 if (alias.equals("xml")) {
  // "xml:" doesn't need a declaration.
  return;
 }
 Stack<NamespaceDecl> mapping = namespaceMap.get(alias);
 if (mapping != null) {
  nsDecl = mapping.peek();
 }
 // The namespace might be null for a namespace-less element.
 assert alias.length() == 0 || nsDecl != null :
  "Namespace alias '" + alias + "' should be mapped in 'namespaceMap'.";
 // Make sure the namespace is described within the blob if it was
 // originally declared externally to it
 if (nsDecl != null && !nsDecl.inBlob && nsDecl.ns != null &&
   !handler.blobNamespaces.contains(alias)) {
  handler.blobNamespaces.add(alias);
  handler.xmlBlob.getNamespaces().add(
    new XmlNamespace(alias, nsDecl.ns.getUri()));
 }
}

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

List<XmlNamespace> blobNamespaces = xml.getNamespaces();
int additionalNsSize = (additionalNs == null ? 0 : additionalNs.size());

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

List<XmlNamespace> blobNamespaces = xml.getNamespaces();
int additionalNsSize = (additionalNs == null ? 0 : additionalNs.size());

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

List<XmlNamespace> blobNamespaces = xml.getNamespaces();
int additionalNsSize = (additionalNs == null ? 0 : additionalNs.size());

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

Collection<XmlNamespace> namespaces = cumulative.getNamespaces();
 cumulative.setLang(xmlBlob.getLang());
 cumulative.setBase(xmlBlob.getBase());
 namespaces.addAll(xmlBlob.getNamespaces());
 w.write(xmlBlob.getBlob());

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

Collection<XmlNamespace> namespaces = cumulative.getNamespaces();
 cumulative.setLang(xmlBlob.getLang());
 cumulative.setBase(xmlBlob.getBase());
 namespaces.addAll(xmlBlob.getNamespaces());
 w.write(xmlBlob.getBlob());

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

Collection<XmlNamespace> namespaces = cumulative.getNamespaces();
 cumulative.setLang(xmlBlob.getLang());
 cumulative.setBase(xmlBlob.getBase());
 namespaces.addAll(xmlBlob.getNamespaces());
 w.write(xmlBlob.getBlob());

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