Java Doc for HtmlCleaner.java in  » Web-Mail » claros-intouch2-2.2-beta » org » htmlcleaner » 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 » Web Mail » claros intouch2 2.2 beta » org.htmlcleaner 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.htmlcleaner.HtmlCleaner

HtmlCleaner
public class HtmlCleaner (Code)
Main HtmlCleaner class.

It represents public interface to the user. It's task is to call tokenizer with specified source HTML, traverse list of produced token list and create internal object model. It also offers a set of methods to write resulting XML to string, file or any output stream.

Typical usage is the following:

HtmlCleaner cleaner = new HtmlCleaner(...); // one of few constructors cleaner.setXXX(...) // optionally, set cleaner's behaviour clener.clean(); // calls cleaning process cleaner.writeXmlXXX(...); // writes resulting XML to string, file or any output stream // cleaner.createDOM(); // writes resulting XML to string, file or any output stream Created by: Vladimir Nikic
Date: November, 2006


Field Summary
final public static  StringDEFAULT_CHARSET
    

Constructor Summary
public  HtmlCleaner(String htmlContent, ITagInfoProvider tagInfoProvider)
     Constructor - creates the instance with specified html content as String.
public  HtmlCleaner(String htmlContent)
     Constructor - creates the instance with specified html content as String.
public  HtmlCleaner(File file, String charset, ITagInfoProvider tagInfoProvider)
     Constructor - creates the instance for specified file.
public  HtmlCleaner(File file, String charset)
     Constructor - creates the instance for specified file.
public  HtmlCleaner(File file, ITagInfoProvider tagInfoProvider)
     Constructor - creates the instance for specified file and charset.
public  HtmlCleaner(File file)
     Constructor - creates the instance for specified file and charset.
public  HtmlCleaner(URL url, String charset, ITagInfoProvider tagInfoProvider)
     Constructor - creates the instance for specified URL and charset.
public  HtmlCleaner(URL url, ITagInfoProvider tagInfoProvider)
     Constructor - creates the instance for specified URL and charset.
public  HtmlCleaner(URL url, String charset)
     Constructor - creates the instance for specified URL and charset.
public  HtmlCleaner(URL url)
     Constructor - creates the instance for specified URL and charset.
public  HtmlCleaner(InputStream in, ITagInfoProvider tagInfoProvider)
    
public  HtmlCleaner(InputStream in)
    
public  HtmlCleaner(InputStream in, String charset)
    

Method Summary
public  voidclean(boolean isTextPlain, boolean addStyleSheet)
    
public  DocumentcreateDOM()
     Creates XML DOM document object.
public  SetgetAllTags()
    
public  StringgetCompactXmlAsString()
    
 DoctypeTokengetDoctype()
    
public  StringgetHyphenReplacementInComment()
    
public  StringgetPrettyXmlAsString()
    
 ReadergetReader()
    
public  StringgetXmlAsString()
    
public  booleanisAdvancedXmlEscape()
    
public  booleanisOmitComments()
    
public  booleanisOmitDeprecatedTags()
    
public  booleanisOmitDoctypeDeclaration()
    
public  booleanisOmitUnknownTags()
    
public  booleanisOmitXmlDeclaration()
    
public  booleanisOmitXmlnsAttributes()
    
public  booleanisRecognizeUnicodeChars()
    
public  booleanisTranslateSpecialEntities()
    
public  booleanisUseCdataForScriptAndStyle()
    
 voidmakeTree(List nodeList, ListIterator nodeIterator)
    
public  voidsetAdvancedXmlEscape(boolean advancedXmlEscape)
    
 voidsetDoctype(DoctypeToken type)
    
public  voidsetHyphenReplacementInComment(String hyphenReplacementInComment)
    
public  voidsetOmitComments(boolean omitComments)
    
public  voidsetOmitDeprecatedTags(boolean omitDeprecatedTags)
    
public  voidsetOmitDoctypeDeclaration(boolean omitDoctypeDeclaration)
    
public  voidsetOmitUnknownTags(boolean omitUnknownTags)
    
public  voidsetOmitXmlDeclaration(boolean omitXmlDeclaration)
    
public  voidsetOmitXmlnsAttributes(boolean omitXmlnsAttributes)
    
public  voidsetRecognizeUnicodeChars(boolean recognizeUnicodeChars)
    
public  voidsetTranslateSpecialEntities(boolean translateSpecialEntities)
    
public  voidsetUseCdataForScriptAndStyle(boolean useCdataForScriptAndStyle)
    
public  voidwriteCompactXmlToFile(String fileName)
    
public  voidwriteCompactXmlToFile(String fileName, String charset)
    
public  voidwriteCompactXmlToStream(OutputStream out)
    
public  voidwriteCompactXmlToStream(OutputStream out, String charset)
    
public  voidwritePrettyXmlToFile(String fileName)
    
public  voidwritePrettyXmlToFile(String fileName, String charset)
    
public  voidwritePrettyXmlToStream(OutputStream out)
    
public  voidwritePrettyXmlToStream(OutputStream out, String charset)
    
public  voidwriteXml(XmlSerializer xmlSerializer)
     The most general way to serialize resulting XML.
public  voidwriteXmlToFile(String fileName)
    
public  voidwriteXmlToFile(String fileName, String charset)
    
public  voidwriteXmlToStream(OutputStream out)
    
public  voidwriteXmlToStream(OutputStream out, String charset)
    

Field Detail
DEFAULT_CHARSET
final public static String DEFAULT_CHARSET(Code)




Constructor Detail
HtmlCleaner
public HtmlCleaner(String htmlContent, ITagInfoProvider tagInfoProvider)(Code)
Constructor - creates the instance with specified html content as String.
Parameters:
  htmlContent -



HtmlCleaner
public HtmlCleaner(String htmlContent)(Code)
Constructor - creates the instance with specified html content as String.
Parameters:
  htmlContent -



HtmlCleaner
public HtmlCleaner(File file, String charset, ITagInfoProvider tagInfoProvider) throws IOException(Code)
Constructor - creates the instance for specified file.
Parameters:
  file -
Parameters:
  charset -
throws:
  IOException -



HtmlCleaner
public HtmlCleaner(File file, String charset) throws IOException(Code)
Constructor - creates the instance for specified file.
Parameters:
  file -
Parameters:
  charset -
throws:
  IOException -



HtmlCleaner
public HtmlCleaner(File file, ITagInfoProvider tagInfoProvider) throws IOException(Code)
Constructor - creates the instance for specified file and charset.
Parameters:
  file -
throws:
  IOException -



HtmlCleaner
public HtmlCleaner(File file) throws IOException(Code)
Constructor - creates the instance for specified file and charset.
Parameters:
  file -
throws:
  IOException -



HtmlCleaner
public HtmlCleaner(URL url, String charset, ITagInfoProvider tagInfoProvider) throws IOException(Code)
Constructor - creates the instance for specified URL and charset.
Parameters:
  url -
Parameters:
  charset -
throws:
  IOException -



HtmlCleaner
public HtmlCleaner(URL url, ITagInfoProvider tagInfoProvider) throws IOException(Code)
Constructor - creates the instance for specified URL and charset.
Parameters:
  url -
Parameters:
  tagInfoProvider -
throws:
  IOException -



HtmlCleaner
public HtmlCleaner(URL url, String charset) throws IOException(Code)
Constructor - creates the instance for specified URL and charset.
Parameters:
  url -
Parameters:
  charset -
throws:
  IOException -



HtmlCleaner
public HtmlCleaner(URL url) throws IOException(Code)
Constructor - creates the instance for specified URL and charset.
Parameters:
  url -
throws:
  IOException -



HtmlCleaner
public HtmlCleaner(InputStream in, ITagInfoProvider tagInfoProvider)(Code)
Constructor - creates the instance for the specified inpout stream
Parameters:
  in -
Parameters:
  tagInfoProvider -



HtmlCleaner
public HtmlCleaner(InputStream in)(Code)
Constructor - creates the instance for the specified inpout stream
Parameters:
  in -



HtmlCleaner
public HtmlCleaner(InputStream in, String charset) throws IOException(Code)
Constructor - creates the instance for the specified inpout stream and the charset
Parameters:
  in -
Parameters:
  charset -
throws:
  IOException -




Method Detail
clean
public void clean(boolean isTextPlain, boolean addStyleSheet) throws IOException(Code)



createDOM
public Document createDOM() throws ParserConfigurationException(Code)
Creates XML DOM document object. Instance of org.w3c.dom.Document



getAllTags
public Set getAllTags()(Code)



getCompactXmlAsString
public String getCompactXmlAsString() throws IOException(Code)



getDoctype
DoctypeToken getDoctype()(Code)



getHyphenReplacementInComment
public String getHyphenReplacementInComment()(Code)



getPrettyXmlAsString
public String getPrettyXmlAsString() throws IOException(Code)



getReader
Reader getReader()(Code)



getXmlAsString
public String getXmlAsString() throws IOException(Code)



isAdvancedXmlEscape
public boolean isAdvancedXmlEscape()(Code)



isOmitComments
public boolean isOmitComments()(Code)



isOmitDeprecatedTags
public boolean isOmitDeprecatedTags()(Code)



isOmitDoctypeDeclaration
public boolean isOmitDoctypeDeclaration()(Code)



isOmitUnknownTags
public boolean isOmitUnknownTags()(Code)



isOmitXmlDeclaration
public boolean isOmitXmlDeclaration()(Code)



isOmitXmlnsAttributes
public boolean isOmitXmlnsAttributes()(Code)



isRecognizeUnicodeChars
public boolean isRecognizeUnicodeChars()(Code)



isTranslateSpecialEntities
public boolean isTranslateSpecialEntities()(Code)



isUseCdataForScriptAndStyle
public boolean isUseCdataForScriptAndStyle()(Code)



makeTree
void makeTree(List nodeList, ListIterator nodeIterator)(Code)



setAdvancedXmlEscape
public void setAdvancedXmlEscape(boolean advancedXmlEscape)(Code)



setDoctype
void setDoctype(DoctypeToken type)(Code)



setHyphenReplacementInComment
public void setHyphenReplacementInComment(String hyphenReplacementInComment)(Code)



setOmitComments
public void setOmitComments(boolean omitComments)(Code)



setOmitDeprecatedTags
public void setOmitDeprecatedTags(boolean omitDeprecatedTags)(Code)



setOmitDoctypeDeclaration
public void setOmitDoctypeDeclaration(boolean omitDoctypeDeclaration)(Code)



setOmitUnknownTags
public void setOmitUnknownTags(boolean omitUnknownTags)(Code)



setOmitXmlDeclaration
public void setOmitXmlDeclaration(boolean omitXmlDeclaration)(Code)



setOmitXmlnsAttributes
public void setOmitXmlnsAttributes(boolean omitXmlnsAttributes)(Code)



setRecognizeUnicodeChars
public void setRecognizeUnicodeChars(boolean recognizeUnicodeChars)(Code)



setTranslateSpecialEntities
public void setTranslateSpecialEntities(boolean translateSpecialEntities)(Code)



setUseCdataForScriptAndStyle
public void setUseCdataForScriptAndStyle(boolean useCdataForScriptAndStyle)(Code)



writeCompactXmlToFile
public void writeCompactXmlToFile(String fileName) throws IOException(Code)



writeCompactXmlToFile
public void writeCompactXmlToFile(String fileName, String charset) throws IOException(Code)



writeCompactXmlToStream
public void writeCompactXmlToStream(OutputStream out) throws IOException(Code)



writeCompactXmlToStream
public void writeCompactXmlToStream(OutputStream out, String charset) throws IOException(Code)



writePrettyXmlToFile
public void writePrettyXmlToFile(String fileName) throws IOException(Code)



writePrettyXmlToFile
public void writePrettyXmlToFile(String fileName, String charset) throws IOException(Code)



writePrettyXmlToStream
public void writePrettyXmlToStream(OutputStream out) throws IOException(Code)



writePrettyXmlToStream
public void writePrettyXmlToStream(OutputStream out, String charset) throws IOException(Code)



writeXml
public void writeXml(XmlSerializer xmlSerializer) throws IOException(Code)
The most general way to serialize resulting XML.
Parameters:
  xmlSerializer -
throws:
  IOException -



writeXmlToFile
public void writeXmlToFile(String fileName) throws IOException(Code)



writeXmlToFile
public void writeXmlToFile(String fileName, String charset) throws IOException(Code)



writeXmlToStream
public void writeXmlToStream(OutputStream out) throws IOException(Code)



writeXmlToStream
public void writeXmlToStream(OutputStream out, String charset) throws IOException(Code)



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.