本文整理了Java中org.dom4j.io.OutputFormat.isTrimText()
方法的一些代码示例,展示了OutputFormat.isTrimText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OutputFormat.isTrimText()
方法的具体详情如下:
包路径:org.dom4j.io.OutputFormat
类名称:OutputFormat
方法名:isTrimText
暂无
代码示例来源:origin: igniterealtime/Openfire
if (format.isTrimText()) {
boolean first = true;
StringTokenizer tokenizer = new StringTokenizer(text);
代码示例来源:origin: igniterealtime/Openfire
if (format.isTrimText()) {
if ((lastOutputNodeType == Node.TEXT_NODE) && !charactersAdded) {
writer.write(" ");
代码示例来源:origin: igniterealtime/Openfire
boolean trim = format.isTrimText();
boolean oldPreserve=preserve;
if (trim) { //verify we have to before more expensive test
代码示例来源:origin: org.dom4j/dom4j
if (format.isTrimText()) {
boolean first = true;
StringTokenizer tokenizer = new StringTokenizer(text);
代码示例来源:origin: org.dom4j/dom4j
if (format.isTrimText()) {
if ((lastOutputNodeType == Node.TEXT_NODE) && !charsAdded) {
writer.write(' ');
代码示例来源:origin: org.mule.modules/mule-module-xml
/**
* @see OutputFormat#isTrimText()
*/
public synchronized boolean isTrimText()
{
return outputFormat.isTrimText();
}
代码示例来源:origin: org.dom4j/dom4j
OutputFormat currentFormat = getOutputFormat();
boolean saveNewlines = currentFormat.isNewlines();
boolean saveTrimText = currentFormat.isTrimText();
String currentIndent = currentFormat.getIndent();
代码示例来源:origin: org.dom4j/dom4j
boolean trim = format.isTrimText();
boolean oldPreserve = preserve;
代码示例来源:origin: dom4j/dom4j
if (format.isTrimText()) {
boolean first = true;
StringTokenizer tokenizer = new StringTokenizer(text);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
if (format.isTrimText()) {
boolean first = true;
StringTokenizer tokenizer = new StringTokenizer(text);
代码示例来源:origin: org.dom4j/com.springsource.org.dom4j
if (format.isTrimText()) {
boolean first = true;
StringTokenizer tokenizer = new StringTokenizer(text);
代码示例来源:origin: org.jenkins-ci.dom4j/dom4j
if (format.isTrimText()) {
boolean first = true;
StringTokenizer tokenizer = new StringTokenizer(text);
代码示例来源:origin: apache/servicemix-bundles
if (format.isTrimText()) {
boolean first = true;
StringTokenizer tokenizer = new StringTokenizer(text);
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
if (format.isTrimText()) {
boolean first = true;
StringTokenizer tokenizer = new StringTokenizer(text);
代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j
if (format.isTrimText()) {
boolean first = true;
StringTokenizer tokenizer = new StringTokenizer(text);
代码示例来源:origin: maven/dom4j
if (format.isTrimText()) {
StringTokenizer tokenizer = new StringTokenizer(text);
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
if (format.isTrimText()) {
boolean first = true;
StringTokenizer tokenizer = new StringTokenizer(text);
代码示例来源:origin: dom4j/dom4j
if (format.isTrimText()) {
if ((lastOutputNodeType == Node.TEXT_NODE) && !charsAdded) {
writer.write(' ');
代码示例来源:origin: org.alfresco/alfresco-repository
private void writeMLValue(Locale locale, Serializable value) throws SAXException
{
AttributesImpl attributes = new AttributesImpl();
attributes.addAttribute(TransferModel.TRANSFER_MODEL_1_0_URI, "locale", "locale", "String",
locale.toString());
writer.startElement(TransferModel.TRANSFER_MODEL_1_0_URI,
ManifestModel.LOCALNAME_ELEMENT_MLVALUE, PREFIX + ":"
+ ManifestModel.LOCALNAME_ELEMENT_MLVALUE, attributes);
if (value != null)
{
String strValue = (String) DefaultTypeConverter.INSTANCE.convert(String.class, value);
boolean oldValue = format.isTrimText();
format.setTrimText(false);
try
{
writer.characters(strValue.toCharArray(), 0, strValue.length());
}
finally
{
format.setTrimText(oldValue);
}
}
writer.endElement(TransferModel.TRANSFER_MODEL_1_0_URI,
ManifestModel.LOCALNAME_ELEMENT_MLVALUE, PREFIX + ":"
+ ManifestModel.LOCALNAME_ELEMENT_MLVALUE);
}
代码示例来源:origin: Alfresco/alfresco-repository
private void writeMLValue(Locale locale, Serializable value) throws SAXException
{
AttributesImpl attributes = new AttributesImpl();
attributes.addAttribute(TransferModel.TRANSFER_MODEL_1_0_URI, "locale", "locale", "String",
locale.toString());
writer.startElement(TransferModel.TRANSFER_MODEL_1_0_URI,
ManifestModel.LOCALNAME_ELEMENT_MLVALUE, PREFIX + ":"
+ ManifestModel.LOCALNAME_ELEMENT_MLVALUE, attributes);
if (value != null)
{
String strValue = (String) DefaultTypeConverter.INSTANCE.convert(String.class, value);
boolean oldValue = format.isTrimText();
format.setTrimText(false);
try
{
writer.characters(strValue.toCharArray(), 0, strValue.length());
}
finally
{
format.setTrimText(oldValue);
}
}
writer.endElement(TransferModel.TRANSFER_MODEL_1_0_URI,
ManifestModel.LOCALNAME_ELEMENT_MLVALUE, PREFIX + ":"
+ ManifestModel.LOCALNAME_ELEMENT_MLVALUE);
}
内容来源于网络,如有侵权,请联系作者删除!