本文整理了Java中org.apache.xml.serialize.OutputFormat.getIndent()
方法的一些代码示例,展示了OutputFormat.getIndent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OutputFormat.getIndent()
方法的具体详情如下:
包路径:org.apache.xml.serialize.OutputFormat
类名称: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;
}
内容来源于网络,如有侵权,请联系作者删除!