本文整理匯總了Java中org.w3c.tidy.Tidy.setQuoteMarks方法的典型用法代碼示例。如果您正苦於以下問題:Java Tidy.setQuoteMarks方法的具體用法?Java Tidy.setQuoteMarks怎麽用?Java Tidy.setQuoteMarks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.w3c.tidy.Tidy
的用法示例。
在下文中一共展示了Tidy.setQuoteMarks方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: JTidyBookProcessor
import org.w3c.tidy.Tidy; //導入方法依賴的package包/類
public JTidyBookProcessor()
{
tidy = new Tidy();
// tidy.setConfigurationFromFile(JTidyBookProcessor.class.getResource("/jtidy.properties").getFile());
tidy.setSpaces(2);
tidy.setIndentContent(true);
tidy.setSmartIndent(true);
tidy.setXHTML(true);
tidy.setQuoteMarks(false);
tidy.setQuoteAmpersand(true);
tidy.setDropEmptyParas(false);
tidy.setTidyMark(false);
tidy.setJoinClasses(true);
tidy.setJoinStyles(true);
tidy.setWraplen(0);
tidy.setDropProprietaryAttributes(true);
tidy.setEscapeCdata(true);
Properties props = new Properties();
props.put("new-blocklevel-tags", "svg image altGlyph altGlyphDef altGlyphItem animate animateColor animateMotion animateTransform circle clipPath color-profile cursor defs desc ellipse feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence filter font font-face font-face-format font-face-name font-face-src font-face-uri foreignObject g glyph glyphRef hkern image line linearGradient marker mask metadata missing-glyph mpath path pattern polygon polyline radialGradient rect script set stop style svg switch symbol text textPath title tref tspan use view vkern");
tidy.getConfiguration().addProps(props);
}
示例2: ConverterXhtml
import org.w3c.tidy.Tidy; //導入方法依賴的package包/類
public void ConverterXhtml(String fileHtml, String fileXhtmlAux) throws Exception {
Tidy tidy = new Tidy();
FileInputStream in = new FileInputStream(fileHtml);
FileOutputStream out = new FileOutputStream(fileXhtmlAux);
tidy.setTidyMark(false);
tidy.setDocType("omit");
tidy.setAltText("");
tidy.setFixBackslash(true);
tidy.setFixComments(true);
tidy.setXmlPi(true);
tidy.setQuoteAmpersand(true);
tidy.setQuoteNbsp(true);
tidy.setNumEntities(true);
tidy.setXmlOut(true);
tidy.setWraplen(999);
tidy.setWriteback(true);
tidy.setQuoteMarks(true);
tidy.setLogicalEmphasis(true);
tidy.setEncloseText(true);
tidy.setHideEndTags(true);
tidy.setShowWarnings(false);
tidy.setQuiet(true);
tidy.setXHTML(true);
tidy.parse(in, out);
in.close();
out.close();
}
示例3: ConverterXhtml
import org.w3c.tidy.Tidy; //導入方法依賴的package包/類
/**
* Method used to transform the data from the html file given as parameter to
* xhtml format file which will be stored in the second file given.
* @param fileHtml input html file path.
* @param fileXhtmlAux output xhtml file path.
* @throws Exception if the files can not be read or written.
*/
public void ConverterXhtml(String fileHtml, String fileXhtmlAux) throws Exception {
Tidy tidy = new Tidy();
FileInputStream in = new FileInputStream(fileHtml);
FileOutputStream out = new FileOutputStream(fileXhtmlAux);
tidy.setTidyMark(false);
tidy.setDocType("omit");
tidy.setAltText("");
tidy.setFixBackslash(true);
tidy.setFixComments(true);
tidy.setXmlPi(true);
tidy.setQuoteAmpersand(true);
tidy.setQuoteNbsp(true);
tidy.setNumEntities(true);
tidy.setXmlOut(true);
tidy.setWraplen(999);
tidy.setWriteback(true);
tidy.setQuoteMarks(true);
tidy.setLogicalEmphasis(true);
tidy.setEncloseText(true);
tidy.setHideEndTags(true);
tidy.setShowWarnings(false);
tidy.setQuiet(true);
tidy.setXHTML(true);
tidy.parse(in, out);
in.close();
out.close();
}