gpt4 book ai didi

org.restlet.ext.xml.XmlWriter.doPrefix()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 14:07:05 28 4
gpt4 key购买 nike

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

XmlWriter.doPrefix介绍

[英]Determine the prefix for an element or attribute name. TODO: this method probably needs some cleanup.
[中]确定元素或属性名称的前缀。TODO:这个方法可能需要一些清理。

代码示例

代码示例来源:origin: org.restlet.jee/org.restlet.ext.xml

/**
 * Force all Namespaces to be declared. This method is used on the root
 * element to ensure that the predeclared Namespaces all appear.
 */
private void forceNSDecls() {
  for (final String prefix : this.forcedDeclTable.keySet()) {
    doPrefix(prefix, null, true);
  }
}

代码示例来源:origin: org.restlet/org.restlet.ext.xml

/**
 * Force all Namespaces to be declared. This method is used on the root
 * element to ensure that the predeclared Namespaces all appear.
 */
private void forceNSDecls() {
  for (final String prefix : this.forcedDeclTable.keySet()) {
    doPrefix(prefix, null, true);
  }
}

代码示例来源:origin: org.restlet.android/org.restlet.ext.xml

/**
 * Force all Namespaces to be declared. This method is used on the root
 * element to ensure that the predeclared Namespaces all appear.
 */
private void forceNSDecls() {
  for (final String prefix : this.forcedDeclTable.keySet()) {
    doPrefix(prefix, null, true);
  }
}

代码示例来源:origin: org.restlet.jee/org.restlet.ext.xml

/**
 * Write an element or attribute name.
 * 
 * @param uri
 *            The Namespace URI.
 * @param localName
 *            The local name.
 * @param qName
 *            The prefixed name, if available, or the empty string.
 * @param isElement
 *            true if this is an element name, false if it is an attribute
 *            name.
 * @exception org.xml.sax.SAXException
 *                This method will throw an IOException wrapped in a
 *                SAXException if there is an error writing the name.
 */
private void writeName(String uri, String localName, String qName,
    boolean isElement) throws SAXException {
  final String prefix = doPrefix(uri, qName, isElement);
  if ((prefix != null) && !"".equals(prefix)) {
    write(prefix);
    write(':');
  }
  write(localName);
}

代码示例来源:origin: org.restlet/org.restlet.ext.xml

/**
 * Write an element or attribute name.
 * 
 * @param uri
 *            The Namespace URI.
 * @param localName
 *            The local name.
 * @param qName
 *            The prefixed name, if available, or the empty string.
 * @param isElement
 *            true if this is an element name, false if it is an attribute
 *            name.
 * @exception org.xml.sax.SAXException
 *                This method will throw an IOException wrapped in a
 *                SAXException if there is an error writing the name.
 */
private void writeName(String uri, String localName, String qName,
    boolean isElement) throws SAXException {
  final String prefix = doPrefix(uri, qName, isElement);
  if ((prefix != null) && !"".equals(prefix)) {
    write(prefix);
    write(':');
  }
  write(localName);
}

代码示例来源:origin: org.restlet.android/org.restlet.ext.xml

/**
 * Write an element or attribute name.
 * 
 * @param uri
 *            The Namespace URI.
 * @param localName
 *            The local name.
 * @param qName
 *            The prefixed name, if available, or the empty string.
 * @param isElement
 *            true if this is an element name, false if it is an attribute
 *            name.
 * @exception org.xml.sax.SAXException
 *                This method will throw an IOException wrapped in a
 *                SAXException if there is an error writing the name.
 */
private void writeName(String uri, String localName, String qName,
    boolean isElement) throws SAXException {
  final String prefix = doPrefix(uri, qName, isElement);
  if ((prefix != null) && !"".equals(prefix)) {
    write(prefix);
    write(':');
  }
  write(localName);
}

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