org.apache.xml.serialize.OutputFormat.getIndent()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(82)

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

OutputFormat.getIndent介绍

[英]Returns the indentation specified. If no indentation was specified, zero is returned and the document should not be indented.
[中]返回指定的缩进。如果未指定缩进,则返回零,文档不应缩进。

代码示例

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/**
 * Increment the indentation for the next line.
 */
public void indent()
{
  _nextIndent += _format.getIndent();
}

代码示例来源:origin: org.geotools/gt2-xml-xsd

/**
 * Returns the indentation specified.
 * <p>
 * If no indentation was specified, zero is returned and the document should
 * not be indented.
 * </p>
 * <p>
 * Defaults to <code>4</code>
 * </p>
 * 
 * @return zero if not indenting, the number of white space characters used
 *         for indentation otherwise.
 * @see #setIndenting(boolean)
 */
public int getIndentSize() {
  return outputFormat.getIndent();
}

代码示例来源:origin: org.geotools.xsd/gt-core

/**
 * Returns the indentation specified.
 * <p>
 * If no indentation was specified, zero is returned and the document should
 * not be indented.
 * </p>
 * <p>
 * Defaults to <code>4</code>
 * </p>
 * 
 * @return zero if not indenting, the number of white space characters used
 *         for indentation otherwise.
 * @see #setIndenting(boolean)
 */
public int getIndentSize() {
  return outputFormat.getIndent();
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/**
 * Decrement the indentation for the next line.
 */
public void unindent()
{
  _nextIndent -= _format.getIndent();
  if ( _nextIndent < 0 )
    _nextIndent = 0;
  // If there is no current line and we're de-identing then
  // this indentation level is actually the next level.
  if ( ( _line.length() + _spaces + _text.length() ) == 0 )
    _thisIndent = _nextIndent;
}

相关文章