本文整理了Java中org.dom4j.io.OutputFormat.isXHTML()
方法的一些代码示例,展示了OutputFormat.isXHTML()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OutputFormat.isXHTML()
方法的具体详情如下:
包路径:org.dom4j.io.OutputFormat
类名称:OutputFormat
方法名:isXHTML
[英]Whether or not to use the XHTML standard: like HTML but passes an XML parser with real, closed tags. Also, XHTML CDATA sections will be output with the CDATA delimiters: ( " <![CDATA[ " and " ]]> " ) otherwise, the class HTMLWriter will output the CDATA text, but not the delimiters. Default is false
[中]是否使用XHTML标准:与HTML类似,但会传递一个带有真实封闭标记的XML解析器。此外,XHTML CDATA部分将使用CDATA分隔符输出:(“<![CDATA[”和“]]>”),否则,HTMLWriter类将输出CDATA文本,但不输出分隔符。默认值为false
代码示例来源:origin: org.dom4j/dom4j
protected void writeCDATA(String text) throws IOException {
// XXX: Should we escape entities?
// writer.write( escapeElementEntities( text ) );
if (getOutputFormat().isXHTML()) {
super.writeCDATA(text);
} else {
writer.write(text);
}
lastOutputNodeType = Node.CDATA_SECTION_NODE;
}
代码示例来源:origin: org.dom4j/dom4j
protected void writeEmptyElementClose(String qualifiedName)
throws IOException {
if (getOutputFormat().isXHTML()) {
// xhtml, always check with format object whether to expand or not.
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the XHTML way: "<br/>",
// ignoring the expansion option, since <br></br> is OK XML,
// but produces twice the linefeeds desired in the browser.
// for netscape 4.7, though all are fine with it, write a space
// before the close slash.
writer.write(" />");
} else {
super.writeEmptyElementClose(qualifiedName);
}
} else {
// html, not xhtml
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the old html way: "<br>".
writer.write(">");
} else {
// it was NOT a special omit tag, check with format object
// whether to expand or not.
super.writeEmptyElementClose(qualifiedName);
}
}
}
代码示例来源:origin: org.mule.modules/mule-module-xml
/**
* @see OutputFormat#isXHTML()
*/
public synchronized boolean isXHTML()
{
return outputFormat.isXHTML();
}
代码示例来源:origin: maven/dom4j
protected void writeCDATA(String text) throws IOException {
// XXX: Should we escape entities?
// writer.write( escapeElementEntities( text ) );
if (getOutputFormat().isXHTML()) {
super.writeCDATA(text);
} else {
writer.write(text);
}
lastOutputNodeType = Node.CDATA_SECTION_NODE;
}
代码示例来源:origin: dom4j/dom4j
protected void writeCDATA(String text) throws IOException {
// XXX: Should we escape entities?
// writer.write( escapeElementEntities( text ) );
if (getOutputFormat().isXHTML()) {
super.writeCDATA(text);
} else {
writer.write(text);
}
lastOutputNodeType = Node.CDATA_SECTION_NODE;
}
代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j
protected void writeCDATA(String text) throws IOException {
// XXX: Should we escape entities?
// writer.write( escapeElementEntities( text ) );
if (getOutputFormat().isXHTML()) {
super.writeCDATA(text);
} else {
writer.write(text);
}
lastOutputNodeType = Node.CDATA_SECTION_NODE;
}
代码示例来源:origin: org.dom4j/com.springsource.org.dom4j
protected void writeCDATA(String text) throws IOException {
// XXX: Should we escape entities?
// writer.write( escapeElementEntities( text ) );
if (getOutputFormat().isXHTML()) {
super.writeCDATA(text);
} else {
writer.write(text);
}
lastOutputNodeType = Node.CDATA_SECTION_NODE;
}
代码示例来源:origin: org.jenkins-ci.dom4j/dom4j
protected void writeCDATA(String text) throws IOException {
// XXX: Should we escape entities?
// writer.write( escapeElementEntities( text ) );
if (disabled || getOutputFormat().isXHTML()) {
super.writeCDATA(text);
} else {
writer.write(text);
}
lastOutputNodeType = Node.CDATA_SECTION_NODE;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
protected void writeCDATA(String text) throws IOException {
// XXX: Should we escape entities?
// writer.write( escapeElementEntities( text ) );
if (getOutputFormat().isXHTML()) {
super.writeCDATA(text);
} else {
writer.write(text);
}
lastOutputNodeType = Node.CDATA_SECTION_NODE;
}
代码示例来源:origin: apache/servicemix-bundles
protected void writeCDATA(String text) throws IOException {
// XXX: Should we escape entities?
// writer.write( escapeElementEntities( text ) );
if (getOutputFormat().isXHTML()) {
super.writeCDATA(text);
} else {
writer.write(text);
}
lastOutputNodeType = Node.CDATA_SECTION_NODE;
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
protected void writeCDATA(String text) throws IOException {
// XXX: Should we escape entities?
// writer.write( escapeElementEntities( text ) );
if (getOutputFormat().isXHTML()) {
super.writeCDATA(text);
} else {
writer.write(text);
}
lastOutputNodeType = Node.CDATA_SECTION_NODE;
}
代码示例来源:origin: org.jenkins-ci.dom4j/dom4j
protected void writeEmptyElementClose(String qualifiedName)
throws IOException {
if (disabled || !omitElementClose(qualifiedName)) {
super.writeEmptyElementClose(qualifiedName);
} else {
if (getOutputFormat().isXHTML()) {
// it was a special omit tag, do it the XHTML way: "<br/>",
// ignoring the expansion option, since <br></br> is OK XML,
// but produces twice the linefeeds desired in the browser.
// for netscape 4.7, though all are fine with it, write a space
// before the close slash.
writer.write(" />");
} else {
// it was a special omit tag, do it the old html way: "<br>".
writer.write(">");
}
}
}
代码示例来源:origin: org.dom4j/com.springsource.org.dom4j
protected void writeEmptyElementClose(String qualifiedName)
throws IOException {
if (getOutputFormat().isXHTML()) {
// xhtml, always check with format object whether to expand or not.
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the XHTML way: "<br/>",
// ignoring the expansion option, since <br></br> is OK XML,
// but produces twice the linefeeds desired in the browser.
// for netscape 4.7, though all are fine with it, write a space
// before the close slash.
writer.write(" />");
} else {
super.writeEmptyElementClose(qualifiedName);
}
} else {
// html, not xhtml
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the old html way: "<br>".
writer.write(">");
} else {
// it was NOT a special omit tag, check with format object
// whether to expand or not.
super.writeEmptyElementClose(qualifiedName);
}
}
}
代码示例来源:origin: dom4j/dom4j
protected void writeEmptyElementClose(String qualifiedName)
throws IOException {
if (getOutputFormat().isXHTML()) {
// xhtml, always check with format object whether to expand or not.
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the XHTML way: "<br/>",
// ignoring the expansion option, since <br></br> is OK XML,
// but produces twice the linefeeds desired in the browser.
// for netscape 4.7, though all are fine with it, write a space
// before the close slash.
writer.write(" />");
} else {
super.writeEmptyElementClose(qualifiedName);
}
} else {
// html, not xhtml
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the old html way: "<br>".
writer.write(">");
} else {
// it was NOT a special omit tag, check with format object
// whether to expand or not.
super.writeEmptyElementClose(qualifiedName);
}
}
}
代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j
protected void writeEmptyElementClose(String qualifiedName)
throws IOException {
if (getOutputFormat().isXHTML()) {
// xhtml, always check with format object whether to expand or not.
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the XHTML way: "<br/>",
// ignoring the expansion option, since <br></br> is OK XML,
// but produces twice the linefeeds desired in the browser.
// for netscape 4.7, though all are fine with it, write a space
// before the close slash.
writer.write(" />");
} else {
super.writeEmptyElementClose(qualifiedName);
}
} else {
// html, not xhtml
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the old html way: "<br>".
writer.write(">");
} else {
// it was NOT a special omit tag, check with format object
// whether to expand or not.
super.writeEmptyElementClose(qualifiedName);
}
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
protected void writeEmptyElementClose(String qualifiedName)
throws IOException {
if (getOutputFormat().isXHTML()) {
// xhtml, always check with format object whether to expand or not.
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the XHTML way: "<br/>",
// ignoring the expansion option, since <br></br> is OK XML,
// but produces twice the linefeeds desired in the browser.
// for netscape 4.7, though all are fine with it, write a space
// before the close slash.
writer.write(" />");
} else {
super.writeEmptyElementClose(qualifiedName);
}
} else {
// html, not xhtml
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the old html way: "<br>".
writer.write(">");
} else {
// it was NOT a special omit tag, check with format object
// whether to expand or not.
super.writeEmptyElementClose(qualifiedName);
}
}
}
代码示例来源:origin: maven/dom4j
protected void writeEmptyElementClose(String qualifiedName)
throws IOException {
if (getOutputFormat().isXHTML()) {
// xhtml, always check with format object whether to expand or not.
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the XHTML way: "<br/>",
// ignoring the expansion option, since <br></br> is OK XML,
// but produces twice the linefeeds desired in the browser.
// for netscape 4.7, though all are fine with it, write a space
// before the close slash.
writer.write(" />");
} else {
super.writeEmptyElementClose(qualifiedName);
}
} else {
// html, not xhtml
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the old html way: "<br>".
writer.write(">");
} else {
// it was NOT a special omit tag, check with format object
// whether to expand or not.
super.writeEmptyElementClose(qualifiedName);
}
}
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
protected void writeEmptyElementClose(String qualifiedName)
throws IOException {
if (getOutputFormat().isXHTML()) {
// xhtml, always check with format object whether to expand or not.
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the XHTML way: "<br/>",
// ignoring the expansion option, since <br></br> is OK XML,
// but produces twice the linefeeds desired in the browser.
// for netscape 4.7, though all are fine with it, write a space
// before the close slash.
writer.write(" />");
} else {
super.writeEmptyElementClose(qualifiedName);
}
} else {
// html, not xhtml
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the old html way: "<br>".
writer.write(">");
} else {
// it was NOT a special omit tag, check with format object
// whether to expand or not.
super.writeEmptyElementClose(qualifiedName);
}
}
}
代码示例来源:origin: apache/servicemix-bundles
protected void writeEmptyElementClose(String qualifiedName)
throws IOException {
if (getOutputFormat().isXHTML()) {
// xhtml, always check with format object whether to expand or not.
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the XHTML way: "<br/>",
// ignoring the expansion option, since <br></br> is OK XML,
// but produces twice the linefeeds desired in the browser.
// for netscape 4.7, though all are fine with it, write a space
// before the close slash.
writer.write(" />");
} else {
super.writeEmptyElementClose(qualifiedName);
}
} else {
// html, not xhtml
if (omitElementClose(qualifiedName)) {
// it was a special omit tag, do it the old html way: "<br>".
writer.write(">");
} else {
// it was NOT a special omit tag, check with format object
// whether to expand or not.
super.writeEmptyElementClose(qualifiedName);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!