Java Doc for Tidy.java in  » HTML-Parser » JTidy » org » w3c » tidy » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » HTML Parser » JTidy » org.w3c.tidy 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.w3c.tidy.Tidy

Tidy
public class Tidy implements Serializable(Code)
HTML parser and pretty printer.
author:
   Dave Raggett dsr@w3.org
author:
   Andy Quick ac.quick@sympatico.ca (translation to Java)
author:
   Fabrizio Giustina
version:
   $Revision: 1.61 $ ($Author: fgiust $)


Field Summary
final static  longserialVersionUID
     Serial Version UID to avoid problems during serialization.

Constructor Summary
public  Tidy()
     Instantiates a new Tidy instance.

Method Summary
public static  org.w3c.dom.DocumentcreateEmptyDocument()
     Creates an empty DOM Document.
public  StringgetAltText()
     alt-text- default text for alt attribute.
public  booleangetAsciiChars()
     ascii-chars- convert quotes and dashes to nearest ASCII char.
public  booleangetBreakBeforeBR()
     break-before-br - output newline before <br>.
public  booleangetBurstSlides()
     split- create slides on each h2 element.
public  intgetCharEncoding()
     Returns the configured character encoding.
public  ConfigurationgetConfiguration()
    
public  StringgetDocType()
     doctype- user specified doctype.
public  booleangetDropEmptyParas()
     drop-empty-paras- discard empty p elements.
public  booleangetDropFontTags()
     drop-font-tags- discard presentation tags.
public  booleangetDropProprietaryAttributes()
     drop-proprietary-attributes- discard proprietary attributes.
public  booleangetEmacs()
     gnu-emacs- if true format error output for GNU Emacs.
public  booleangetEncloseBlockText()
     enclose-block-text- if true text in blocks is wrapped in <p>'s.
public  booleangetEncloseText()
     enclose-text- if true text at body is wrapped in <p>'s.
public  StringgetErrfile()
     Errfile - file name to write errors to.
public  PrintWritergetErrout()
     Errout - the error output stream.
public  booleangetEscapeCdata()
     escape-cdata -replace CDATA sections with escaped text.
public  booleangetFixBackslash()
     fix-backslash- fix URLs by replacing \ with /.
public  booleangetFixComments()
     fix-bad-comments- fix comments with adjacent hyphens.
public  booleangetFixUri()
     fix-uri- output BODY content only.
public  booleangetForceOutput()
     force-output- output document even if errors were found.
public  booleangetHideComments()
     hide-comments- hides all (real) comments in output.
public  booleangetHideEndTags()
     hide-endtags - suppress optional end tags.
public  booleangetIndentAttributes()
     indent-attributes- newline+indent before each attribute.
public  booleangetIndentCdata()
     indent-cdata- indent CDATA sections.
public  booleangetIndentContent()
     indent - indent content of appropriate tags.
public  StringgetInputEncoding()
     input-encoding the character encoding used for input.
public  StringgetInputStreamName()
    
public  booleangetJoinClasses()
     join-classes- join multiple class attributes.
public  booleangetJoinStyles()
     join-styles- join multiple style attributes.
public  booleangetKeepFileTimes()
     keep-time- if true last modified time is preserved.
public  booleangetLiteralAttribs()
     literal-attributes- if true attributes may use newlines.
public  booleangetLogicalEmphasis()
     logical-emphasis- replace i by em and b by strong.
public  booleangetLowerLiterals()
     lower-literals- folds known attribute values to lower case.
public  booleangetMakeBare()
     make-clean - remove Microsoft cruft.
public  booleangetMakeClean()
     make-clean - remove presentational clutter.
public  booleangetNumEntities()
     numeric-entities- output entities other than the built-in HTML entities in the numeric rather than the named entity form.
public  booleangetOnlyErrors()
     only-errors - if true normal output is suppressed.
public  StringgetOutputEncoding()
     output-encoding the character encoding used for output.
public  intgetParseErrors()
     ParseErrors - the number of errors that occurred in the most recent parse operation.
public  intgetParseWarnings()
     ParseWarnings - the number of warnings that occurred in the most recent parse operation.
public  booleangetPrintBodyOnly()
     print-body-only- output BODY content only.
public  booleangetQuiet()
     quiet - no 'Parsing X', guessed DTD or summary.
public  booleangetQuoteAmpersand()
     quote-ampersand- output naked ampersand as &.
public  booleangetQuoteMarks()
     quote-marks- output " marks as &quot;.
public  booleangetQuoteNbsp()
     quote-nbsp- output non-breaking space as entity.
public  booleangetRawOut()
     output-raw- avoid mapping values > 127 to entities.
public  intgetRepeatedAttributes()
     repeated-attributes- keep first or last duplicate attribute.
public  booleangetReplaceColor()
     replace-color- replace hex color attribute values with names.
public  intgetShowErrors()
     show-errors- number of errors to put out.
public  booleangetShowWarnings()
     show-warnings - show warnings? (errors are always shown).
public  StringgetSlidestyle()
    
public  booleangetSmartIndent()
     SmartIndent - does text/block level content effect indentation.
public  intgetSpaces()
     indent-spaces- default indentation.
public  PrintWritergetStderr()
    
public  intgetTabsize()
     tab-size- tab size in chars.
public  booleangetTidyMark()
     tidy-mark- add meta element indicating tidied doc.
public  booleangetTrimEmptyElements()
     trim-empty-elements- trim empty elements.
public  booleangetUpperCaseAttrs()
     uppercase-attributes - output attributes in upper case.
public  booleangetUpperCaseTags()
     uppercase-tags - output tags in upper case.
public  booleangetWord2000()
     word-2000- draconian cleaning for Word2000.
public  booleangetWrapAsp()
     wrap-asp- wrap within ASP pseudo elements.
public  booleangetWrapAttVals()
     wrap-attributes- wrap within attribute values.
public  booleangetWrapJste()
     wrap-jste- wrap within JSTE pseudo elements.
public  booleangetWrapPhp()
     wrap-php- wrap within PHP pseudo elements.
public  booleangetWrapScriptlets()
     wrap-script-literals- wrap within JavaScript string literals.
public  booleangetWrapSection()
     wrap-sections- wrap within <![ ...
public  intgetWraplen()
     wrap- default wrap margin.
public  booleangetWriteback()
     writeback - if true then output tidied markup.
public  booleangetXHTML()
     output-xhtml - output extensible HTML.
public  booleangetXmlOut()
     output-xml - create output as XML.
public  booleangetXmlPIs()
     assume-xml-procins This option specifies if Tidy should change the parsing of processing instructions to require ?> as the terminator rather than >.
public  booleangetXmlPi()
     add-xml-pi- add <?xml?> for XML docs.
public  booleangetXmlSpace()
     add-xml-space- if set to yes adds xml:space attr as needed.
public  booleangetXmlTags()
     input-xml - treat input as XML.
public static  voidmain(String[] argv)
     Command line interface to parser and pretty printer.
protected  intmainExec(String[] argv)
     Main method, but returns the return code as an int instead of calling System.exit(code).
public  Nodeparse(InputStream in, OutputStream out)
     Parses InputStream in and returns the root Node.
public  org.w3c.dom.DocumentparseDOM(InputStream in, OutputStream out)
     Parses InputStream in and returns a DOM Document node.
public  voidpprint(org.w3c.dom.Document doc, OutputStream out)
     Pretty-prints a DOM Document.
public  voidpprint(org.w3c.dom.Node node, OutputStream out)
     Pretty-prints a DOM Node.
Parameters:
  node - org.w3c.dom.Node.
public  voidsetAltText(String altText)
     alt-text- default text for alt attribute.
public  voidsetAsciiChars(boolean asciiChars)
     ascii-chars- convert quotes and dashes to nearest ASCII char.
public  voidsetBreakBeforeBR(boolean breakBeforeBR)
     break-before-br - output newline before <br>.
public  voidsetBurstSlides(boolean burstSlides)
     split- create slides on each h2 element.
public  voidsetCharEncoding(int charencoding)
     Sets the character encoding used both for input and for output.
public  voidsetConfigurationFromFile(String filename)
     Sets the configuration from a configuration file.
public  voidsetConfigurationFromProps(Properties props)
     Sets the configuration from a properties object.
public  voidsetDocType(String doctype)
     doctype- user specified doctype.
public  voidsetDropEmptyParas(boolean dropEmptyParas)
     drop-empty-paras- discard empty p elements.
public  voidsetDropFontTags(boolean dropFontTags)
     drop-font-tags- discard presentation tags.
public  voidsetDropProprietaryAttributes(boolean dropProprietaryAttributes)
     drop-proprietary-attributes- discard proprietary attributes.
public  voidsetEmacs(boolean emacs)
     gnu-emacs- if true format error output for GNU Emacs.
public  voidsetEncloseBlockText(boolean encloseBlockText)
     enclose-block-text- if true text in blocks is wrapped in <p>'s.
public  voidsetEncloseText(boolean encloseText)
     enclose-text- if true text at body is wrapped in <p>'s.
public  voidsetErrfile(String errfile)
     Errfile - file name to write errors to.
public  voidsetErrout(PrintWriter out)
    
public  voidsetEscapeCdata(boolean escapeCdata)
     escape-cdata- replace CDATA sections with escaped text.
public  voidsetFixBackslash(boolean fixBackslash)
     fix-backslash- fix URLs by replacing \ with /.
public  voidsetFixComments(boolean fixComments)
     fix-bad-comments- fix comments with adjacent hyphens.
public  voidsetFixUri(boolean fixUri)
     fix-uri- fix uri references applying URI encoding if necessary.
public  voidsetForceOutput(boolean forceOutput)
     force-output- output document even if errors were found.
public  voidsetHideComments(boolean hideComments)
     hide-comments- hides all (real) comments in output.
public  voidsetHideEndTags(boolean hideEndTags)
     hide-endtags - suppress optional end tags.
public  voidsetIndentAttributes(boolean indentAttributes)
     indent-attributes- newline+indent before each attribute.
public  voidsetIndentCdata(boolean indentCdata)
     indent-cdata- indent CDATA sections.
public  voidsetIndentContent(boolean indentContent)
     indent - indent content of appropriate tags.
public  voidsetInputEncoding(String encoding)
     input-encoding the character encoding used for input.
public  voidsetInputStreamName(String name)
     InputStreamName - the name of the input stream (printed in the header information).
public  voidsetJoinClasses(boolean joinClasses)
     join-classes- join multiple class attributes.
public  voidsetJoinStyles(boolean joinStyles)
     join-styles- join multiple style attributes.
public  voidsetKeepFileTimes(boolean keepFileTimes)
     keep-time- if true last modified time is preserved.
public  voidsetLiteralAttribs(boolean literalAttribs)
     literal-attributes- if true attributes may use newlines.
public  voidsetLogicalEmphasis(boolean logicalEmphasis)
     logical-emphasis- replace i by em and b by strong.
public  voidsetLowerLiterals(boolean lowerLiterals)
     lower-literals- folds known attribute values to lower case.
public  voidsetMakeBare(boolean makeBare)
     make-bare - remove Microsoft cruft.
public  voidsetMakeClean(boolean makeClean)
     make-clean - remove presentational clutter.
public  voidsetMessageListener(TidyMessageListener listener)
     Attach a TidyMessageListener which will be notified for messages and errors.
public  voidsetNumEntities(boolean numEntities)
     numeric-entities- output entities other than the built-in HTML entities in the numeric rather than the named entity form.
public  voidsetOnlyErrors(boolean onlyErrors)
     only-errors - if true normal output is suppressed.
public  voidsetOutputEncoding(String encoding)
     output-encoding the character encoding used for output.
public  voidsetPrintBodyOnly(boolean bodyOnly)
     print-body-only- output BODY content only.
public  voidsetQuiet(boolean quiet)
     quiet - no 'Parsing X', guessed DTD or summary.
public  voidsetQuoteAmpersand(boolean quoteAmpersand)
     quote-ampersand- output naked ampersand as &.
public  voidsetQuoteMarks(boolean quoteMarks)
     quote-marks- output " marks as &quot;.
public  voidsetQuoteNbsp(boolean quoteNbsp)
     quote-nbsp- output non-breaking space as entity.
public  voidsetRawOut(boolean rawOut)
     output-raw- avoid mapping values > 127 to entities.
public  voidsetRepeatedAttributes(int repeatedAttributes)
     repeated-attributes- keep first or last duplicate attribute.
public  voidsetReplaceColor(boolean replaceColor)
     replace-color- replace hex color attribute values with names.
public  voidsetShowErrors(int showErrors)
     show-errors- set the number of errors to put out.
public  voidsetShowWarnings(boolean showWarnings)
     show-warnings - show warnings? (errors are always shown).
public  voidsetSlidestyle(String slidestyle)
    
public  voidsetSmartIndent(boolean smartIndent)
     SmartIndent - does text/block level content effect indentation.
public  voidsetSpaces(int spaces)
     indent-spaces- default indentation.
public  voidsetTabsize(int tabsize)
     tab-size- tab size in chars.
public  voidsetTidyMark(boolean tidyMark)
     tidy-mark- add meta element indicating tidied doc.
public  voidsetTrimEmptyElements(boolean trimEmpty)
     trim-empty-elements- trim empty elements.
public  voidsetUpperCaseAttrs(boolean upperCaseAttrs)
     uppercase-attributes - output attributes in upper case.
public  voidsetUpperCaseTags(boolean upperCaseTags)
     uppercase-tags - output tags in upper case.
public  voidsetWord2000(boolean word2000)
     word-2000- draconian cleaning for Word2000.
public  voidsetWrapAsp(boolean wrapAsp)
     wrap-asp- wrap within ASP pseudo elements.
public  voidsetWrapAttVals(boolean wrapAttVals)
     wrap-attributes- wrap within attribute values.
public  voidsetWrapJste(boolean wrapJste)
     wrap-jste- wrap within JSTE pseudo elements.
public  voidsetWrapPhp(boolean wrapPhp)
     wrap-php- wrap within PHP pseudo elements.
public  voidsetWrapScriptlets(boolean wrapScriptlets)
     wrap-script-literals- wrap within JavaScript string literals.
public  voidsetWrapSection(boolean wrapSection)
     wrap-sections- wrap within <![ ...
public  voidsetWraplen(int wraplen)
     wrap- default wrap margin.
public  voidsetWriteback(boolean writeback)
     writeback - if true then output tidied markup.
public  voidsetXHTML(boolean xhtml)
     output-xhtml - output extensible HTML.
public  voidsetXmlOut(boolean xmlOut)
     output-xml - create output as XML.
public  voidsetXmlPIs(boolean xmlPIs)
     assume-xml-procins This option specifies if Tidy should change the parsing of processing instructions to require ?> as the terminator rather than >.
public  voidsetXmlPi(boolean xmlPi)
     add-xml-pi- add <?xml?> for XML docs.
public  voidsetXmlSpace(boolean xmlSpace)
     add-xml-space- if set to yes adds xml:space attr as needed.
public  voidsetXmlTags(boolean xmlTags)
     input-xml - treat input as XML.

Field Detail
serialVersionUID
final static long serialVersionUID(Code)
Serial Version UID to avoid problems during serialization.




Constructor Detail
Tidy
public Tidy()(Code)
Instantiates a new Tidy instance. It's reccomended that a new instance is used at each parsing.




Method Detail
createEmptyDocument
public static org.w3c.dom.Document createEmptyDocument()(Code)
Creates an empty DOM Document. a new org.w3c.dom.Document



getAltText
public String getAltText()(Code)
alt-text- default text for alt attribute. default text for alt attribute
See Also:   Configuration.altText



getAsciiChars
public boolean getAsciiChars()(Code)
ascii-chars- convert quotes and dashes to nearest ASCII char. true if tidy will convert quotes and dashes to nearest ASCII char



getBreakBeforeBR
public boolean getBreakBeforeBR()(Code)
break-before-br - output newline before <br>. true if tidy will output a newline before <br>
See Also:   Configuration.breakBeforeBR



getBurstSlides
public boolean getBurstSlides()(Code)
split- create slides on each h2 element. true if tidy will create slides on each h2 element
See Also:   Configuration.burstSlides



getCharEncoding
public int getCharEncoding()(Code)
Returns the configured character encoding. character encoding constant



getConfiguration
public Configuration getConfiguration()(Code)
Returns the actual configuration tidy configuration



getDocType
public String getDocType()(Code)
doctype- user specified doctype. omit | auto | strict | loose | fpi where the fpi is a string similarto "-//ACME//DTD HTML 3.14159//EN" Note: for fpi include the double-quotes in the string.
See Also:   Configuration.docTypeStr
See Also:   Configuration.docTypeMode



getDropEmptyParas
public boolean getDropEmptyParas()(Code)
drop-empty-paras- discard empty p elements. true if tidy will discard empty p elements
See Also:   Configuration.dropEmptyParas



getDropFontTags
public boolean getDropFontTags()(Code)
drop-font-tags- discard presentation tags. true if tidy will discard presentation tags
See Also:   Configuration.dropFontTags



getDropProprietaryAttributes
public boolean getDropProprietaryAttributes()(Code)
drop-proprietary-attributes- discard proprietary attributes. true if tidy will discard proprietary attributes
See Also:   Configuration.dropProprietaryAttributes



getEmacs
public boolean getEmacs()(Code)
gnu-emacs- if true format error output for GNU Emacs. true if tidy will format error output for GNU Emacs
See Also:   Configuration.emacs



getEncloseBlockText
public boolean getEncloseBlockText()(Code)
enclose-block-text- if true text in blocks is wrapped in <p>'s. return true if tidy should will text text in blocks in <p>'s.
See Also:   Configuration.encloseBlockText



getEncloseText
public boolean getEncloseText()(Code)
enclose-text- if true text at body is wrapped in <p>'s. true if tidy will wrap text at body in <p>'s.
See Also:   Configuration.encloseBodyText



getErrfile
public String getErrfile()(Code)
Errfile - file name to write errors to. error file name
See Also:   Configuration.errfile



getErrout
public PrintWriter getErrout()(Code)
Errout - the error output stream. error output stream.



getEscapeCdata
public boolean getEscapeCdata()(Code)
escape-cdata -replace CDATA sections with escaped text. true if tidy will replace CDATA sections with escaped text



getFixBackslash
public boolean getFixBackslash()(Code)
fix-backslash- fix URLs by replacing \ with /. true if tidy will fix URLs by replacing \ with /
See Also:   Configuration.fixBackslash



getFixComments
public boolean getFixComments()(Code)
fix-bad-comments- fix comments with adjacent hyphens. true if tidy will fix comments with adjacent hyphens
See Also:   Configuration.fixComments



getFixUri
public boolean getFixUri()(Code)
fix-uri- output BODY content only. true if tidy will fix uri references



getForceOutput
public boolean getForceOutput()(Code)
force-output- output document even if errors were found. true if tidy will output document even if errors were found



getHideComments
public boolean getHideComments()(Code)
hide-comments- hides all (real) comments in output. true if tidy will hide all comments in output



getHideEndTags
public boolean getHideEndTags()(Code)
hide-endtags - suppress optional end tags. true if tidy will suppress optional end tags
See Also:   Configuration.hideEndTags



getIndentAttributes
public boolean getIndentAttributes()(Code)
indent-attributes- newline+indent before each attribute. true if tidy will output a newline+indent before each attribute
See Also:   Configuration.indentAttributes



getIndentCdata
public boolean getIndentCdata()(Code)
indent-cdata- indent CDATA sections. true if tidy will indent CDATA sections



getIndentContent
public boolean getIndentContent()(Code)
indent - indent content of appropriate tags. true if tidy will indent content of appropriate tags
See Also:   Configuration.indentContent



getInputEncoding
public String getInputEncoding()(Code)
input-encoding the character encoding used for input. the java name of the encoding currently used for input



getInputStreamName
public String getInputStreamName()(Code)



getJoinClasses
public boolean getJoinClasses()(Code)
join-classes- join multiple class attributes. true if tidy will join multiple class attributes



getJoinStyles
public boolean getJoinStyles()(Code)
join-styles- join multiple style attributes. true if tidy will join multiple style attributes



getKeepFileTimes
public boolean getKeepFileTimes()(Code)
keep-time- if true last modified time is preserved. true if tidy will preserved last modified time in input file.
See Also:   Configuration.keepFileTimes



getLiteralAttribs
public boolean getLiteralAttribs()(Code)
literal-attributes- if true attributes may use newlines. true if attributes may use newlines
See Also:   Configuration.literalAttribs



getLogicalEmphasis
public boolean getLogicalEmphasis()(Code)
logical-emphasis- replace i by em and b by strong. true if tidy will replace i by em and b by strong
See Also:   Configuration.logicalEmphasis



getLowerLiterals
public boolean getLowerLiterals()(Code)
lower-literals- folds known attribute values to lower case. true if tidy will folds known attribute values to lower case



getMakeBare
public boolean getMakeBare()(Code)
make-clean - remove Microsoft cruft. true if tidy will remove Microsoft cruft
See Also:   Configuration.makeBare



getMakeClean
public boolean getMakeClean()(Code)
make-clean - remove presentational clutter. true if tidy will remove presentational clutter
See Also:   Configuration.makeClean



getNumEntities
public boolean getNumEntities()(Code)
numeric-entities- output entities other than the built-in HTML entities in the numeric rather than the named entity form. true if tidy will output entities in the numeric form.
See Also:   Configuration.numEntities



getOnlyErrors
public boolean getOnlyErrors()(Code)
only-errors - if true normal output is suppressed. true if normal output is suppressed.
See Also:   Configuration.onlyErrors



getOutputEncoding
public String getOutputEncoding()(Code)
output-encoding the character encoding used for output. the java name of the encoding currently used for output



getParseErrors
public int getParseErrors()(Code)
ParseErrors - the number of errors that occurred in the most recent parse operation. number of errors that occurred in the most recent parse operation.



getParseWarnings
public int getParseWarnings()(Code)
ParseWarnings - the number of warnings that occurred in the most recent parse operation. number of warnings that occurred in the most recent parse operation.



getPrintBodyOnly
public boolean getPrintBodyOnly()(Code)
print-body-only- output BODY content only. true if tidy will print only the document body



getQuiet
public boolean getQuiet()(Code)
quiet - no 'Parsing X', guessed DTD or summary. true if tidy will not output summary, warnings or errors
See Also:   Configuration.quiet



getQuoteAmpersand
public boolean getQuoteAmpersand()(Code)
quote-ampersand- output naked ampersand as &. true if tidy will output naked ampersand as &
See Also:   Configuration.quoteAmpersand



getQuoteMarks
public boolean getQuoteMarks()(Code)
quote-marks- output " marks as &quot;. true if tidy will output " marks as &quot;
See Also:   Configuration.quoteMarks



getQuoteNbsp
public boolean getQuoteNbsp()(Code)
quote-nbsp- output non-breaking space as entity. true if tidy will output non-breaking space as entity
See Also:   Configuration.quoteNbsp



getRawOut
public boolean getRawOut()(Code)
output-raw- avoid mapping values > 127 to entities. true if tidy will not map values > 127 to entities
See Also:   Configuration.rawOut



getRepeatedAttributes
public int getRepeatedAttributes()(Code)
repeated-attributes- keep first or last duplicate attribute. Configuration.KEEP_FIRST | Configuration.KEEP_LAST



getReplaceColor
public boolean getReplaceColor()(Code)
replace-color- replace hex color attribute values with names. true if tidy will replace hex color attribute values with names



getShowErrors
public int getShowErrors()(Code)
show-errors- number of errors to put out. the number of errors tidy will put out



getShowWarnings
public boolean getShowWarnings()(Code)
show-warnings - show warnings? (errors are always shown). false if warnings are not shown
See Also:   Configuration.showWarnings



getSlidestyle
public String getSlidestyle()(Code)
null



getSmartIndent
public boolean getSmartIndent()(Code)
SmartIndent - does text/block level content effect indentation. true if text/block level content should effect indentation
See Also:   Configuration.smartIndent



getSpaces
public int getSpaces()(Code)
indent-spaces- default indentation. number of spaces used for indentation
See Also:   Configuration.spaces



getStderr
public PrintWriter getStderr()(Code)



getTabsize
public int getTabsize()(Code)
tab-size- tab size in chars. tab size in chars
See Also:   Configuration.tabsize



getTidyMark
public boolean getTidyMark()(Code)
tidy-mark- add meta element indicating tidied doc. true if tidy will add meta element indicating tidied doc
See Also:   Configuration.tidyMark



getTrimEmptyElements
public boolean getTrimEmptyElements()(Code)
trim-empty-elements- trim empty elements. true if tidy will trim empty elements



getUpperCaseAttrs
public boolean getUpperCaseAttrs()(Code)
uppercase-attributes - output attributes in upper case. true if tidy should will attributes in upper case
See Also:   Configuration.upperCaseAttrs



getUpperCaseTags
public boolean getUpperCaseTags()(Code)
uppercase-tags - output tags in upper case. true if tidy should will tags in upper case
See Also:   Configuration.upperCaseTags



getWord2000
public boolean getWord2000()(Code)
word-2000- draconian cleaning for Word2000. true if tidy will clean word2000 documents
See Also:   Configuration.word2000



getWrapAsp
public boolean getWrapAsp()(Code)
wrap-asp- wrap within ASP pseudo elements. true if tidy will wrap within ASP pseudo elements
See Also:   Configuration.wrapAsp



getWrapAttVals
public boolean getWrapAttVals()(Code)
wrap-attributes- wrap within attribute values. true if tidy will wrap within attribute values
See Also:   Configuration.wrapAttVals



getWrapJste
public boolean getWrapJste()(Code)
wrap-jste- wrap within JSTE pseudo elements. true if tidy will wrap within JSTE pseudo elements
See Also:   Configuration.wrapJste



getWrapPhp
public boolean getWrapPhp()(Code)
wrap-php- wrap within PHP pseudo elements. true if tidy will wrap within PHP pseudo elements
See Also:   Configuration.wrapPhp



getWrapScriptlets
public boolean getWrapScriptlets()(Code)
wrap-script-literals- wrap within JavaScript string literals. true if tidy will wrap within JavaScript string literals
See Also:   Configuration.wrapScriptlets



getWrapSection
public boolean getWrapSection()(Code)
wrap-sections- wrap within <![ ... ]> section tags true if tidy will wrap within <![ ... ]> section tags
See Also:   Configuration.wrapSection



getWraplen
public int getWraplen()(Code)
wrap- default wrap margin. default wrap margin
See Also:   Configuration.wraplen



getWriteback
public boolean getWriteback()(Code)
writeback - if true then output tidied markup. NOTE: this property is ignored when parsing from an InputStream. true if tidy will output tidied markup in input file
See Also:   Configuration.writeback



getXHTML
public boolean getXHTML()(Code)
output-xhtml - output extensible HTML. true if tidy will output XHTML
See Also:   Configuration.xHTML



getXmlOut
public boolean getXmlOut()(Code)
output-xml - create output as XML. true if tidy will create output as xml
See Also:   Configuration.xmlOut



getXmlPIs
public boolean getXmlPIs()(Code)
assume-xml-procins This option specifies if Tidy should change the parsing of processing instructions to require ?> as the terminator rather than >. This option is automatically set if the input is in XML. true if tidy will expect a ?> at the end of processing instructions
See Also:   Configuration.xmlPIs



getXmlPi
public boolean getXmlPi()(Code)
add-xml-pi- add <?xml?> for XML docs. true if tidy will add <?xml?> for XML docs
See Also:   Configuration.xmlPi



getXmlSpace
public boolean getXmlSpace()(Code)
add-xml-space- if set to yes adds xml:space attr as needed. true if tidy will add xml:space attr as needed
See Also:   Configuration.xmlSpace



getXmlTags
public boolean getXmlTags()(Code)
input-xml - treat input as XML. true if tidy will treat input as XML
See Also:   Configuration.xmlTags



main
public static void main(String[] argv)(Code)
Command line interface to parser and pretty printer.
Parameters:
  argv - command line parameters



mainExec
protected int mainExec(String[] argv)(Code)
Main method, but returns the return code as an int instead of calling System.exit(code). Needed for testing main method without shutting down tests.
Parameters:
  argv - command line parameters return code



parse
public Node parse(InputStream in, OutputStream out)(Code)
Parses InputStream in and returns the root Node. If out is non-null, pretty prints to OutputStream out.
Parameters:
  in - input stream
Parameters:
  out - optional output stream parsed org.w3c.tidy.Node



parseDOM
public org.w3c.dom.Document parseDOM(InputStream in, OutputStream out)(Code)
Parses InputStream in and returns a DOM Document node. If out is non-null, pretty prints to OutputStream out.
Parameters:
  in - input stream
Parameters:
  out - optional output stream parsed org.w3c.dom.Document



pprint
public void pprint(org.w3c.dom.Document doc, OutputStream out)(Code)
Pretty-prints a DOM Document. Must be an instance of org.w3c.tidy.DOMDocumentImpl.
Parameters:
  doc - org.w3c.dom.Document
Parameters:
  out - output stream



pprint
public void pprint(org.w3c.dom.Node node, OutputStream out)(Code)
Pretty-prints a DOM Node.
Parameters:
  node - org.w3c.dom.Node. Must be an instance of org.w3c.tidy.DOMNodeImpl.
Parameters:
  out - output stream



setAltText
public void setAltText(String altText)(Code)
alt-text- default text for alt attribute.
Parameters:
  altText - default text for alt attribute
See Also:   Configuration.altText



setAsciiChars
public void setAsciiChars(boolean asciiChars)(Code)
ascii-chars- convert quotes and dashes to nearest ASCII char.
Parameters:
  asciiChars - true = convert quotes and dashes to nearest ASCII char
See Also:   Configuration.asciiChars



setBreakBeforeBR
public void setBreakBeforeBR(boolean breakBeforeBR)(Code)
break-before-br - output newline before <br>.
Parameters:
  breakBeforeBR - true if tidy should output a newline before <br>
See Also:   Configuration.breakBeforeBR



setBurstSlides
public void setBurstSlides(boolean burstSlides)(Code)
split- create slides on each h2 element.
Parameters:
  burstSlides - true if tidy should create slides on each h2 element
See Also:   Configuration.burstSlides



setCharEncoding
public void setCharEncoding(int charencoding)(Code)
Sets the character encoding used both for input and for output.
Parameters:
  charencoding - encoding constant



setConfigurationFromFile
public void setConfigurationFromFile(String filename)(Code)
Sets the configuration from a configuration file.
Parameters:
  filename - configuration file name/path.



setConfigurationFromProps
public void setConfigurationFromProps(Properties props)(Code)
Sets the configuration from a properties object.
Parameters:
  props - Properties object



setDocType
public void setDocType(String doctype)(Code)
doctype- user specified doctype.
Parameters:
  doctype - omit | auto | strict | loose | fpi where the fpi is a stringsimilar to "-//ACME//DTD HTML 3.14159//EN" Note: for fpi include the double-quotes in thestring.
See Also:   Configuration.docTypeStr
See Also:   Configuration.docTypeMode



setDropEmptyParas
public void setDropEmptyParas(boolean dropEmptyParas)(Code)
drop-empty-paras- discard empty p elements.
Parameters:
  dropEmptyParas - true if tidy should discard empty p elements
See Also:   Configuration.dropEmptyParas



setDropFontTags
public void setDropFontTags(boolean dropFontTags)(Code)
drop-font-tags- discard presentation tags.
Parameters:
  dropFontTags - true if tidy should discard presentation tags
See Also:   Configuration.dropFontTags



setDropProprietaryAttributes
public void setDropProprietaryAttributes(boolean dropProprietaryAttributes)(Code)
drop-proprietary-attributes- discard proprietary attributes.
Parameters:
  dropProprietaryAttributes - true if tidy should discard proprietary attributes
See Also:   Configuration.dropProprietaryAttributes



setEmacs
public void setEmacs(boolean emacs)(Code)
gnu-emacs- if true format error output for GNU Emacs.
Parameters:
  emacs - true if tidy should format error output for GNU Emacs
See Also:   Configuration.emacs



setEncloseBlockText
public void setEncloseBlockText(boolean encloseBlockText)(Code)
enclose-block-text- if true text in blocks is wrapped in <p>'s.
Parameters:
  encloseBlockText - true if tidy should wrap text text in blocks in <p>'s.
See Also:   Configuration.encloseBlockText



setEncloseText
public void setEncloseText(boolean encloseText)(Code)
enclose-text- if true text at body is wrapped in <p>'s.
Parameters:
  encloseText - true if tidy should wrap text at body in <p>'s.
See Also:   Configuration.encloseBodyText



setErrfile
public void setErrfile(String errfile)(Code)
Errfile - file name to write errors to.
Parameters:
  errfile - file name to write errors to
See Also:   Configuration.errfile



setErrout
public void setErrout(PrintWriter out)(Code)



setEscapeCdata
public void setEscapeCdata(boolean escapeCdata)(Code)
escape-cdata- replace CDATA sections with escaped text.
Parameters:
  escapeCdata - true = replace CDATA sections with escaped text
See Also:   Configuration.escapeCdata



setFixBackslash
public void setFixBackslash(boolean fixBackslash)(Code)
fix-backslash- fix URLs by replacing \ with /.
Parameters:
  fixBackslash - true if tidy should fix URLs by replacing \ with /
See Also:   Configuration.fixBackslash



setFixComments
public void setFixComments(boolean fixComments)(Code)
fix-bad-comments- fix comments with adjacent hyphens.
Parameters:
  fixComments - true if tidy should fix comments with adjacent hyphens
See Also:   Configuration.fixComments



setFixUri
public void setFixUri(boolean fixUri)(Code)
fix-uri- fix uri references applying URI encoding if necessary.
Parameters:
  fixUri - true = fix uri references
See Also:   Configuration.fixUri



setForceOutput
public void setForceOutput(boolean forceOutput)(Code)
force-output- output document even if errors were found.
Parameters:
  forceOutput - true = output document even if errors were found
See Also:   Configuration.forceOutput



setHideComments
public void setHideComments(boolean hideComments)(Code)
hide-comments- hides all (real) comments in output.
Parameters:
  hideComments - true = hides all comments in output
See Also:   Configuration.hideComments



setHideEndTags
public void setHideEndTags(boolean hideEndTags)(Code)
hide-endtags - suppress optional end tags.
Parameters:
  hideEndTags - true= suppress optional end tags
See Also:   Configuration.hideEndTags



setIndentAttributes
public void setIndentAttributes(boolean indentAttributes)(Code)
indent-attributes- newline+indent before each attribute.
Parameters:
  indentAttributes - true if tidy should output a newline+indent before each attribute
See Also:   Configuration.indentAttributes



setIndentCdata
public void setIndentCdata(boolean indentCdata)(Code)
indent-cdata- indent CDATA sections.
Parameters:
  indentCdata - true = indent CDATA sections
See Also:   Configuration.indentCdata



setIndentContent
public void setIndentContent(boolean indentContent)(Code)
indent - indent content of appropriate tags.
Parameters:
  indentContent - indent content of appropriate tags
See Also:   Configuration.indentContent



setInputEncoding
public void setInputEncoding(String encoding)(Code)
input-encoding the character encoding used for input.
Parameters:
  encoding - a valid java encoding name



setInputStreamName
public void setInputStreamName(String name)(Code)
InputStreamName - the name of the input stream (printed in the header information).
Parameters:
  name - input stream name



setJoinClasses
public void setJoinClasses(boolean joinClasses)(Code)
join-classes- join multiple class attributes.
Parameters:
  joinClasses - true = join multiple class attributes
See Also:   Configuration.joinClasses



setJoinStyles
public void setJoinStyles(boolean joinStyles)(Code)
join-styles- join multiple style attributes.
Parameters:
  joinStyles - true = join multiple style attributes
See Also:   Configuration.joinStyles



setKeepFileTimes
public void setKeepFileTimes(boolean keepFileTimes)(Code)
keep-time- if true last modified time is preserved.
Parameters:
  keepFileTimes - true if tidy should preserved last modified time in input file.
See Also:   Configuration.keepFileTimes



setLiteralAttribs
public void setLiteralAttribs(boolean literalAttribs)(Code)
literal-attributes- if true attributes may use newlines.
Parameters:
  literalAttribs - true if attributes may use newlines
See Also:   Configuration.literalAttribs



setLogicalEmphasis
public void setLogicalEmphasis(boolean logicalEmphasis)(Code)
logical-emphasis- replace i by em and b by strong.
Parameters:
  logicalEmphasis - true if tidy should replace i by em and b by strong
See Also:   Configuration.logicalEmphasis



setLowerLiterals
public void setLowerLiterals(boolean lowerLiterals)(Code)
lower-literals- folds known attribute values to lower case.
Parameters:
  lowerLiterals - true = folds known attribute values to lower case
See Also:   Configuration.lowerLiterals



setMakeBare
public void setMakeBare(boolean makeBare)(Code)
make-bare - remove Microsoft cruft.
Parameters:
  makeBare - true to remove Microsoft cruft
See Also:   Configuration.makeBare



setMakeClean
public void setMakeClean(boolean makeClean)(Code)
make-clean - remove presentational clutter.
Parameters:
  makeClean - true to remove presentational clutter
See Also:   Configuration.makeClean



setMessageListener
public void setMessageListener(TidyMessageListener listener)(Code)
Attach a TidyMessageListener which will be notified for messages and errors.
Parameters:
  listener - TidyMessageListener implementation



setNumEntities
public void setNumEntities(boolean numEntities)(Code)
numeric-entities- output entities other than the built-in HTML entities in the numeric rather than the named entity form.
Parameters:
  numEntities - true if tidy should output entities in the numeric form.
See Also:   Configuration.numEntities



setOnlyErrors
public void setOnlyErrors(boolean onlyErrors)(Code)
only-errors - if true normal output is suppressed.
Parameters:
  onlyErrors - if true normal output is suppressed.
See Also:   Configuration.onlyErrors



setOutputEncoding
public void setOutputEncoding(String encoding)(Code)
output-encoding the character encoding used for output.
Parameters:
  encoding - a valid java encoding name



setPrintBodyOnly
public void setPrintBodyOnly(boolean bodyOnly)(Code)
print-body-only- output BODY content only.
Parameters:
  bodyOnly - true = print only the document body
See Also:   Configuration.bodyOnly



setQuiet
public void setQuiet(boolean quiet)(Code)
quiet - no 'Parsing X', guessed DTD or summary.
Parameters:
  quiet - true= don't output summary, warnings or errors
See Also:   Configuration.quiet



setQuoteAmpersand
public void setQuoteAmpersand(boolean quoteAmpersand)(Code)
quote-ampersand- output naked ampersand as &.
Parameters:
  quoteAmpersand - true if tidy should output naked ampersand as &
See Also:   Configuration.quoteAmpersand



setQuoteMarks
public void setQuoteMarks(boolean quoteMarks)(Code)
quote-marks- output " marks as &quot;.
Parameters:
  quoteMarks - true if tidy should output " marks as &quot;
See Also:   Configuration.quoteMarks



setQuoteNbsp
public void setQuoteNbsp(boolean quoteNbsp)(Code)
quote-nbsp- output non-breaking space as entity.
Parameters:
  quoteNbsp - true if tidy should output non-breaking space as entity
See Also:   Configuration.quoteNbsp



setRawOut
public void setRawOut(boolean rawOut)(Code)
output-raw- avoid mapping values > 127 to entities. This has the same effect of specifying a "raw" encoding in the original version of tidy.
Parameters:
  rawOut - avoid mapping values > 127 to entities
See Also:   Configuration.rawOut



setRepeatedAttributes
public void setRepeatedAttributes(int repeatedAttributes)(Code)
repeated-attributes- keep first or last duplicate attribute.
Parameters:
  repeatedAttributes - Configuration.KEEP_FIRST | Configuration.KEEP_LAST
See Also:   Configuration.duplicateAttrs



setReplaceColor
public void setReplaceColor(boolean replaceColor)(Code)
replace-color- replace hex color attribute values with names.
Parameters:
  replaceColor - true = replace hex color attribute values with names
See Also:   Configuration.replaceColor



setShowErrors
public void setShowErrors(int showErrors)(Code)
show-errors- set the number of errors to put out.
Parameters:
  showErrors - number of errors to put out
See Also:   Configuration.showErrors



setShowWarnings
public void setShowWarnings(boolean showWarnings)(Code)
show-warnings - show warnings? (errors are always shown).
Parameters:
  showWarnings - if false warnings are not shown
See Also:   Configuration.showWarnings



setSlidestyle
public void setSlidestyle(String slidestyle)(Code)

Parameters:
  slidestyle - N/A



setSmartIndent
public void setSmartIndent(boolean smartIndent)(Code)
SmartIndent - does text/block level content effect indentation.
Parameters:
  smartIndent - true if text/block level content should effect indentation
See Also:   Configuration.smartIndent



setSpaces
public void setSpaces(int spaces)(Code)
indent-spaces- default indentation.
Parameters:
  spaces - number of spaces used for indentation
See Also:   Configuration.spaces



setTabsize
public void setTabsize(int tabsize)(Code)
tab-size- tab size in chars.
Parameters:
  tabsize - tab size in chars
See Also:   Configuration.tabsize



setTidyMark
public void setTidyMark(boolean tidyMark)(Code)
tidy-mark- add meta element indicating tidied doc.
Parameters:
  tidyMark - true if tidy should add meta element indicating tidied doc
See Also:   Configuration.tidyMark



setTrimEmptyElements
public void setTrimEmptyElements(boolean trimEmpty)(Code)
trim-empty-elements- trim empty elements. trim-empty-elements true = trim empty elements
See Also:   Configuration.trimEmpty



setUpperCaseAttrs
public void setUpperCaseAttrs(boolean upperCaseAttrs)(Code)
uppercase-attributes - output attributes in upper case.
Parameters:
  upperCaseAttrs - true if tidy should output attributes in upper case (default is lowercase)
See Also:   Configuration.upperCaseAttrs



setUpperCaseTags
public void setUpperCaseTags(boolean upperCaseTags)(Code)
uppercase-tags - output tags in upper case.
Parameters:
  upperCaseTags - true if tidy should output tags in upper case (default is lowercase)
See Also:   Configuration.upperCaseTags



setWord2000
public void setWord2000(boolean word2000)(Code)
word-2000- draconian cleaning for Word2000.
Parameters:
  word2000 - true if tidy should clean word2000 documents
See Also:   Configuration.word2000



setWrapAsp
public void setWrapAsp(boolean wrapAsp)(Code)
wrap-asp- wrap within ASP pseudo elements.
Parameters:
  wrapAsp - true if tidy should wrap within ASP pseudo elements
See Also:   Configuration.wrapAsp



setWrapAttVals
public void setWrapAttVals(boolean wrapAttVals)(Code)
wrap-attributes- wrap within attribute values.
Parameters:
  wrapAttVals - true if tidy should wrap within attribute values
See Also:   Configuration.wrapAttVals



setWrapJste
public void setWrapJste(boolean wrapJste)(Code)
wrap-jste- wrap within JSTE pseudo elements.
Parameters:
  wrapJste - true if tidy should wrap within JSTE pseudo elements
See Also:   Configuration.wrapJste



setWrapPhp
public void setWrapPhp(boolean wrapPhp)(Code)
wrap-php- wrap within PHP pseudo elements.
Parameters:
  wrapPhp - true if tidy should wrap within PHP pseudo elements
See Also:   Configuration.wrapPhp



setWrapScriptlets
public void setWrapScriptlets(boolean wrapScriptlets)(Code)
wrap-script-literals- wrap within JavaScript string literals.
Parameters:
  wrapScriptlets - true if tidy should wrap within JavaScript string literals
See Also:   Configuration.wrapScriptlets



setWrapSection
public void setWrapSection(boolean wrapSection)(Code)
wrap-sections- wrap within <![ ... ]> section tags
Parameters:
  wrapSection - true if tidy should wrap within <![ ... ]> section tags
See Also:   Configuration.wrapSection



setWraplen
public void setWraplen(int wraplen)(Code)
wrap- default wrap margin.
Parameters:
  wraplen - default wrap margin
See Also:   Configuration.wraplen



setWriteback
public void setWriteback(boolean writeback)(Code)
writeback - if true then output tidied markup. NOTE: this property is ignored when parsing from an InputStream.
Parameters:
  writeback - true= output tidied markup
See Also:   Configuration.writeback



setXHTML
public void setXHTML(boolean xhtml)(Code)
output-xhtml - output extensible HTML.
Parameters:
  xhtml - true if tidy should output XHTML
See Also:   Configuration.xHTML



setXmlOut
public void setXmlOut(boolean xmlOut)(Code)
output-xml - create output as XML.
Parameters:
  xmlOut - true if tidy should create output as xml
See Also:   Configuration.xmlOut



setXmlPIs
public void setXmlPIs(boolean xmlPIs)(Code)
assume-xml-procins This option specifies if Tidy should change the parsing of processing instructions to require ?> as the terminator rather than >. This option is automatically set if the input is in XML.
Parameters:
  xmlPIs - true if tidy should expect a ?> at the end of processing instructions
See Also:   Configuration.xmlPIs



setXmlPi
public void setXmlPi(boolean xmlPi)(Code)
add-xml-pi- add <?xml?> for XML docs.
Parameters:
  xmlPi - true if tidy should add <?xml?> for XML docs
See Also:   Configuration.xmlPi



setXmlSpace
public void setXmlSpace(boolean xmlSpace)(Code)
add-xml-space- if set to yes adds xml:space attr as needed.
Parameters:
  xmlSpace - true if tidy should add xml:space attr as needed
See Also:   Configuration.xmlSpace



setXmlTags
public void setXmlTags(boolean xmlTags)(Code)
input-xml - treat input as XML.
Parameters:
  xmlTags - true if tidy should treat input as XML
See Also:   Configuration.xmlTags



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.