- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.google.gdata.util.common.xml.XmlNamespace
类的一些代码示例,展示了XmlNamespace
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlNamespace
类的具体详情如下:
包路径:com.google.gdata.util.common.xml.XmlNamespace
类名称:XmlNamespace
[英]Represents an XML namespace, including the associated namespace URI and an optional alias prefix to use in XML output.
[中]表示XML名称空间,包括关联的名称空间URI和在XML输出中使用的可选别名前缀。
代码示例来源:origin: com.google.gdata/gdata-core-1.0
/** SAX callback. */
@Override
public void startPrefixMapping(String alias, String uri) {
Stack<NamespaceDecl> mapping = namespaceMap.get(alias);
if (mapping == null) {
mapping = new Stack<NamespaceDecl>();
namespaceMap.put(alias, mapping);
}
XmlNamespace ns = new XmlNamespace(alias, uri);
NamespaceDecl nsDecl = new NamespaceDecl(ns);
mapping.push(nsDecl);
elementNamespaces.add(ns);
}
代码示例来源:origin: com.google.gdata/gdata-core-1.0
/**
* Returns {@code true} if this qname has a namespace value that will match
* any namespace.
*
* @see ANY_NAMESPACE
*/
public boolean matchesAnyNamespace() {
return ANY_NAMESPACE.equals(namespace);
}
代码示例来源:origin: com.google.gdata/gdata-core-1.0
/**
* Returns the namespace URI associated with a given namespace alias.
*
* @param nsAlias namespace alias, or {@code null} for default namespace.
* @return namespace URI, or {@code null} if not found.
*/
protected String getNamespaceUri(String nsAlias) {
if (nsAlias == null) {
return defaultNamespace;
}
// Walk the stack from the top to find an element with this ns alias.
for (int i = elementStack.size() - 1; i >= 0; --i) {
Element element = elementStack.get(i);
for (XmlNamespace ns : element.nsDecls) {
if (ns.getAlias().equals(nsAlias)) {
return ns.getUri();
}
}
}
return null;
}
代码示例来源: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.mulesoft.google/google-api-gdata
namespaces.add(new XmlNamespace(blobNs.getAlias(),
blobNs.getUri()));
代码示例来源:origin: com.google.gdata/gdata-java-client
/**
* Defines a natural ordering for ExtensionDescription based upon
* the qualified name of the mapped XML element. Elements with no
* namespace are considered to precede all others.
*/
public int compareTo(ExtensionDescription desc) {
String ns1 = namespace.getUri();
if (ns1 == null) {
ns1 = "";
}
String ns2 = desc.namespace.getUri();
if (ns2 == null) {
ns2 = "";
}
int nscomp = ns1.compareTo(ns2);
if (nscomp != 0) {
return nscomp;
}
return localName.compareTo(desc.localName);
}
代码示例来源:origin: com.mulesoft.google/google-api-gdata
public int compareTo(QName o) {
if (getNs() == null) {
if (o.getNs() != null) {
return -1;
}
} else {
if (o.getNs() == null) {
return 1;
}
int result = getNs().getUri().compareTo(o.getNs().getUri());
if (result != 0) {
if (ANY_NAMESPACE.equals(o.getNs())) {
return -1;
}
return result;
}
}
String localName = getLocalName();
int compare = localName.compareTo(o.getLocalName());
if (compare != 0 && ANY_LOCALNAME.equals(localName)) {
return -1;
}
return compare;
}
}
代码示例来源:origin: com.mulesoft.google/google-api-gdata
@Override
public String toString() {
if (getNs() == null || "".equals(getNs().getAlias())) {
return getLocalName();
}
return getNs().getAlias() + ":" + getLocalName();
}
代码示例来源:origin: com.google.gdata/gdata-java-client
namespaces.add(new XmlNamespace(blobNs.getAlias(),
blobNs.getUri()));
代码示例来源:origin: com.google.gdata/gdata-core-1.0
/**
* Defines a natural ordering for ExtensionDescription based upon
* the qualified name of the mapped XML element. Elements with no
* namespace are considered to precede all others.
*/
public int compareTo(ExtensionDescription desc) {
String ns1 = namespace.getUri();
if (ns1 == null) {
ns1 = "";
}
String ns2 = desc.namespace.getUri();
if (ns2 == null) {
ns2 = "";
}
int nscomp = ns1.compareTo(ns2);
if (nscomp != 0) {
return nscomp;
}
return localName.compareTo(desc.localName);
}
代码示例来源:origin: com.google.gdata/gdata-java-client
public int compareTo(QName o) {
if (getNs() == null) {
if (o.getNs() != null) {
return -1;
}
} else {
if (o.getNs() == null) {
return 1;
}
int result = getNs().getUri().compareTo(o.getNs().getUri());
if (result != 0) {
if (ANY_NAMESPACE.equals(o.getNs())) {
return -1;
}
return result;
}
}
String localName = getLocalName();
int compare = localName.compareTo(o.getLocalName());
if (compare != 0 && ANY_LOCALNAME.equals(localName)) {
return -1;
}
return compare;
}
}
代码示例来源:origin: com.google.gdata/gdata-core-1.0
@Override
public String toString() {
if (getNs() == null || "".equals(getNs().getAlias())) {
return getLocalName();
}
return getNs().getAlias() + ":" + getLocalName();
}
代码示例来源:origin: com.google.gdata/gdata-core-1.0
/** SAX callback. */
@Override
public void startPrefixMapping(String alias, String uri) {
Stack<NamespaceDecl> mapping = namespaceMap.get(alias);
if (mapping == null) {
mapping = new Stack<NamespaceDecl>();
namespaceMap.put(alias, mapping);
}
XmlNamespace ns = new XmlNamespace(alias, uri);
NamespaceDecl nsDecl = new NamespaceDecl(ns);
mapping.push(nsDecl);
elementNamespaces.add(ns);
}
代码示例来源:origin: com.google.gdata/gdata-core-1.0
namespaces.add(new XmlNamespace(blobNs.getAlias(),
blobNs.getUri()));
代码示例来源:origin: com.mulesoft.google/google-api-gdata
/**
* Returns the namespace URI associated with a given namespace alias.
*
* @param nsAlias namespace alias, or {@code null} for default namespace.
* @return namespace URI, or {@code null} if not found.
*/
protected String getNamespaceUri(String nsAlias) {
if (nsAlias == null) {
return defaultNamespace;
}
// Walk the stack from the top to find an element with this ns alias.
for (int i = elementStack.size() - 1; i >= 0; --i) {
Element element = elementStack.get(i);
for (XmlNamespace ns : element.nsDecls) {
if (ns.getAlias().equals(nsAlias)) {
return ns.getUri();
}
}
}
return null;
}
代码示例来源:origin: com.mulesoft.google/google-api-gdata
/**
* Defines a natural ordering for ExtensionDescription based upon
* the qualified name of the mapped XML element. Elements with no
* namespace are considered to precede all others.
*/
public int compareTo(ExtensionDescription desc) {
String ns1 = namespace.getUri();
if (ns1 == null) {
ns1 = "";
}
String ns2 = desc.namespace.getUri();
if (ns2 == null) {
ns2 = "";
}
int nscomp = ns1.compareTo(ns2);
if (nscomp != 0) {
return nscomp;
}
return localName.compareTo(desc.localName);
}
代码示例来源:origin: com.google.gdata/gdata-core-1.0
public int compareTo(QName o) {
if (getNs() == null) {
if (o.getNs() != null) {
return -1;
}
} else {
if (o.getNs() == null) {
return 1;
}
int result = getNs().getUri().compareTo(o.getNs().getUri());
if (result != 0) {
if (ANY_NAMESPACE.equals(o.getNs())) {
return -1;
}
return result;
}
}
String localName = getLocalName();
int compare = localName.compareTo(o.getLocalName());
if (compare != 0 && ANY_LOCALNAME.equals(localName)) {
return -1;
}
return compare;
}
}
代码示例来源:origin: com.google.gdata/gdata-java-client
@Override
public String toString() {
if (getNs() == null || "".equals(getNs().getAlias())) {
return getLocalName();
}
return getNs().getAlias() + ":" + getLocalName();
}
代码示例来源:origin: com.google.gdata/gdata-java-client
/**
* Returns {@code true} if this qname has a namespace value that will match
* any namespace.
*
* @see ANY_NAMESPACE
*/
public boolean matchesAnyNamespace() {
return ANY_NAMESPACE.equals(namespace);
}
代码示例来源:origin: com.mulesoft.google/google-api-gdata
/** SAX callback. */
@Override
public void startPrefixMapping(String alias, String uri) {
Stack<NamespaceDecl> mapping = namespaceMap.get(alias);
if (mapping == null) {
mapping = new Stack<NamespaceDecl>();
namespaceMap.put(alias, mapping);
}
XmlNamespace ns = new XmlNamespace(alias, uri);
NamespaceDecl nsDecl = new NamespaceDecl(ns);
mapping.push(nsDecl);
elementNamespaces.add(ns);
}
我有以下 XML
我正在尝试使用 FOR XML SQL Server 的特性来生成一些 XML,具有一些特定的命名空间。 我的目标 XML 应该类似于: 2001-11-13T00:00
我正在尝试创建一个应该如下所示的 xml 1 4 4 53 创建测试或测试元素不是问题,但是创
我有以下查询: WITH XMLNAMESPACES ('CommonImport StudentRecordCount="1" xsi:schemaLocation="http://collegeb
我将以下字符串加载到 XML 文档中: soapenv:Server El cliente con los parámetros in
我正在将一个字符串加载到包含以下结构的 XML 文档中: 然后我将全部加载到 XmlDocument 中: Xml
我有如下查询: ;WITH XMLNAMESPACES ( DEFAULT 'http://www.somewhere.com') SELECT ( 'SOMETHING' ) FOR XML PAT
本文整理了Java中com.sun.xml.txw2.annotation.XmlNamespace.value()方法的一些代码示例,展示了XmlNamespace.value()的具体用法。这些代
本文整理了Java中com.google.gdata.util.common.xml.XmlNamespace.getAlias()方法的一些代码示例,展示了XmlNamespace.getAlias
本文整理了Java中com.google.gdata.util.common.xml.XmlNamespace.getUri()方法的一些代码示例,展示了XmlNamespace.getUri()的具
本文整理了Java中com.google.gdata.util.common.xml.XmlNamespace.()方法的一些代码示例,展示了XmlNamespace.()的具体用法。这些代码示例主要
本文整理了Java中com.google.gdata.util.common.xml.XmlNamespace.equals()方法的一些代码示例,展示了XmlNamespace.equals()的具
是否有人设法在 SQL Server 的 T-SQL 中创建一个还包含 WITH XMLNAMESPACES 声明的 CTE? 似乎两个 WITH 关键字都坚持是“T-SQL 批处理中的第一个”,但这
经过几天的调整,我仍然无法做到这一点。我正在尝试读取一个包含大量命名空间的 xml 文件,将特定的节点值插入到不同的表中。 XML Unknown
我是一名优秀的程序员,十分优秀!