Java Doc for HTMLConfiguration.java in  » HTML-Parser » nekohtml » org » cyberneko » html » 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 » nekohtml » org.cyberneko.html 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.cyberneko.html.HTMLConfiguration

HTMLConfiguration
public class HTMLConfiguration extends ParserConfigurationSettings implements XMLPullParserConfiguration(Code)
An XNI-based parser configuration that can be used to parse HTML documents. This configuration can be used directly in order to parse HTML documents or can be used in conjunction with any XNI based tools, such as the Xerces2 implementation.

This configuration recognizes the following features:

  • http://cyberneko.org/html/features/augmentations
  • http://cyberneko.org/html/features/report-errors
  • http://cyberneko.org/html/features/report-errors/simple
  • http://cyberneko.org/html/features/balance-tags
  • and
  • the features supported by the scanner and tag balancer components.

This configuration recognizes the following properties:

  • http://cyberneko.org/html/properties/names/elems
  • http://cyberneko.org/html/properties/names/attrs
  • http://cyberneko.org/html/properties/filters
  • http://cyberneko.org/html/properties/error-reporter
  • and
  • the properties supported by the scanner and tag balancer.

For complete usage information, refer to the documentation.
See Also:   HTMLScanner
See Also:   HTMLTagBalancer
See Also:   HTMLErrorReporter
author:
   Andy Clark
version:
   $Id: HTMLConfiguration.java,v 1.9 2005/02/14 03:56:54 andyc Exp $


Inner Class :protected class ErrorReporter implements HTMLErrorReporter

Field Summary
final protected static  StringAUGMENTATIONS
     Include infoset augmentations.
final protected static  StringBALANCE_TAGS
     Balance tags.
final protected static  StringERROR_DOMAIN
     Error domain.
final protected static  StringERROR_REPORTER
     Error reporter.
final protected static  StringFILTERS
     Pipeline filters.
final protected static  StringNAMESPACES
     Namespaces.
final protected static  StringNAMES_ATTRS
     Modify HTML attribute names: { "upper", "lower", "default" }.
final protected static  StringNAMES_ELEMS
     Modify HTML element names: { "upper", "lower", "default" }.
final protected static  StringREPORT_ERRORS
     Report errors.
final protected static  StringSIMPLE_ERROR_FORMAT
     Simple report format.
protected static  booleanXERCES_2_0_0
     Parser version is Xerces 2.0.0.
protected static  booleanXERCES_2_0_1
     Parser version is Xerces 2.0.1.
protected static  booleanXML4J_4_0_x
     Parser version is XML4J 4.0.x.
protected  booleanfCloseStream
     Stream opened by parser.
protected  XMLDTDContentModelHandlerfDTDContentModelHandler
     DTD content model handler.
protected  XMLDTDHandlerfDTDHandler
     DTD handler.
protected  XMLDocumentHandlerfDocumentHandler
     Document handler.
final protected  HTMLScannerfDocumentScanner
     Document scanner.
protected  XMLEntityResolverfEntityResolver
     Entity resolver.
protected  XMLErrorHandlerfErrorHandler
     Error handler.
final protected  HTMLErrorReporterfErrorReporter
     Error reporter.
final protected  VectorfHTMLComponents
     Components.
protected  LocalefLocale
     Locale.
final protected  NamespaceBinderfNamespaceBinder
     Namespace binder.
final protected  HTMLTagBalancerfTagBalancer
     HTML tag balancer.

Constructor Summary
public  HTMLConfiguration()
     Default constructor.

Method Summary
protected  voidaddComponent(HTMLComponent component)
     Adds a component.
public  voidcleanup()
     If the application decides to terminate parsing before the xml document is fully parsed, the application should call this method to free any resource allocated during parsing.
public  voidevaluateInputSource(XMLInputSource inputSource)
     EXPERIMENTAL: may change in next release
Immediately evaluates an input source and add the new content (e.g.
public  XMLDTDContentModelHandlergetDTDContentModelHandler()
     Returns the DTD content model handler.
public  XMLDTDHandlergetDTDHandler()
     Returns the DTD handler.
public  XMLDocumentHandlergetDocumentHandler()
     Returns the document handler.
public  XMLEntityResolvergetEntityResolver()
     Returns the entity resolver.
public  XMLErrorHandlergetErrorHandler()
     Returns the error handler.
public  LocalegetLocale()
     Returns the locale.
public  voidparse(XMLInputSource source)
     Parses a document.
public  booleanparse(boolean complete)
     Parses the document in a pull parsing fashion.
Parameters:
  complete - True if the pull parser should parse theremaining document completely.
public  voidpushInputSource(XMLInputSource inputSource)
     Pushes an input source onto the current entity stack.
protected  voidreset()
     Resets the parser configuration.
public  voidsetDTDContentModelHandler(XMLDTDContentModelHandler handler)
     Sets the DTD content model handler.
public  voidsetDTDHandler(XMLDTDHandler handler)
     Sets the DTD handler.
public  voidsetDocumentHandler(XMLDocumentHandler handler)
     Sets the document handler.
public  voidsetEntityResolver(XMLEntityResolver resolver)
     Sets the entity resolver.
public  voidsetErrorHandler(XMLErrorHandler handler)
     Sets the error handler.
public  voidsetFeature(String featureId, boolean state)
     Sets a feature.
public  voidsetInputSource(XMLInputSource inputSource)
     Sets the input source for the document to parse.
public  voidsetLocale(Locale locale)
     Sets the locale.
public  voidsetProperty(String propertyId, Object value)
     Sets a property.

Field Detail
AUGMENTATIONS
final protected static String AUGMENTATIONS(Code)
Include infoset augmentations.



BALANCE_TAGS
final protected static String BALANCE_TAGS(Code)
Balance tags.



ERROR_DOMAIN
final protected static String ERROR_DOMAIN(Code)
Error domain.



ERROR_REPORTER
final protected static String ERROR_REPORTER(Code)
Error reporter.



FILTERS
final protected static String FILTERS(Code)
Pipeline filters.



NAMESPACES
final protected static String NAMESPACES(Code)
Namespaces.



NAMES_ATTRS
final protected static String NAMES_ATTRS(Code)
Modify HTML attribute names: { "upper", "lower", "default" }.



NAMES_ELEMS
final protected static String NAMES_ELEMS(Code)
Modify HTML element names: { "upper", "lower", "default" }.



REPORT_ERRORS
final protected static String REPORT_ERRORS(Code)
Report errors.



SIMPLE_ERROR_FORMAT
final protected static String SIMPLE_ERROR_FORMAT(Code)
Simple report format.



XERCES_2_0_0
protected static boolean XERCES_2_0_0(Code)
Parser version is Xerces 2.0.0.



XERCES_2_0_1
protected static boolean XERCES_2_0_1(Code)
Parser version is Xerces 2.0.1.



XML4J_4_0_x
protected static boolean XML4J_4_0_x(Code)
Parser version is XML4J 4.0.x.



fCloseStream
protected boolean fCloseStream(Code)
Stream opened by parser. Therefore, must close stream manually upon termination of parsing.



fDTDContentModelHandler
protected XMLDTDContentModelHandler fDTDContentModelHandler(Code)
DTD content model handler.



fDTDHandler
protected XMLDTDHandler fDTDHandler(Code)
DTD handler.



fDocumentHandler
protected XMLDocumentHandler fDocumentHandler(Code)
Document handler.



fDocumentScanner
final protected HTMLScanner fDocumentScanner(Code)
Document scanner.



fEntityResolver
protected XMLEntityResolver fEntityResolver(Code)
Entity resolver.



fErrorHandler
protected XMLErrorHandler fErrorHandler(Code)
Error handler.



fErrorReporter
final protected HTMLErrorReporter fErrorReporter(Code)
Error reporter.



fHTMLComponents
final protected Vector fHTMLComponents(Code)
Components.



fLocale
protected Locale fLocale(Code)
Locale.



fNamespaceBinder
final protected NamespaceBinder fNamespaceBinder(Code)
Namespace binder.



fTagBalancer
final protected HTMLTagBalancer fTagBalancer(Code)
HTML tag balancer.




Constructor Detail
HTMLConfiguration
public HTMLConfiguration()(Code)
Default constructor.




Method Detail
addComponent
protected void addComponent(HTMLComponent component)(Code)
Adds a component.



cleanup
public void cleanup()(Code)
If the application decides to terminate parsing before the xml document is fully parsed, the application should call this method to free any resource allocated during parsing. For example, close all opened streams.



evaluateInputSource
public void evaluateInputSource(XMLInputSource inputSource)(Code)
EXPERIMENTAL: may change in next release
Immediately evaluates an input source and add the new content (e.g. the output written by an embedded script).
Parameters:
  inputSource - The new input source to start scanning.
See Also:   HTMLConfiguration.pushInputSource(XMLInputSource)



getDTDContentModelHandler
public XMLDTDContentModelHandler getDTDContentModelHandler()(Code)
Returns the DTD content model handler.



getDTDHandler
public XMLDTDHandler getDTDHandler()(Code)
Returns the DTD handler.



getDocumentHandler
public XMLDocumentHandler getDocumentHandler()(Code)
Returns the document handler.



getEntityResolver
public XMLEntityResolver getEntityResolver()(Code)
Returns the entity resolver.



getErrorHandler
public XMLErrorHandler getErrorHandler()(Code)
Returns the error handler.



getLocale
public Locale getLocale()(Code)
Returns the locale.



parse
public void parse(XMLInputSource source) throws XNIException, IOException(Code)
Parses a document.



parse
public boolean parse(boolean complete) throws XNIException, IOException(Code)
Parses the document in a pull parsing fashion.
Parameters:
  complete - True if the pull parser should parse theremaining document completely. True if there is more document to parse.
exception:
  XNIException - Any XNI exception, possibly wrapping another exception.
exception:
  IOException - An IO exception from the parser, possiblyfrom a byte stream or character streamsupplied by the parser.
See Also:   HTMLConfiguration.setInputSource



pushInputSource
public void pushInputSource(XMLInputSource inputSource)(Code)
Pushes an input source onto the current entity stack. This enables the scanner to transparently scan new content (e.g. the output written by an embedded script). At the end of the current entity, the scanner returns where it left off at the time this entity source was pushed.

Hint: To use this feature to insert the output of <SCRIPT> tags, remember to buffer the entire output of the processed instructions before pushing a new input source. Otherwise, events may appear out of sequence.
Parameters:
  inputSource - The new input source to start scanning.
See Also:   HTMLConfiguration.evaluateInputSource(XMLInputSource)




reset
protected void reset() throws XMLConfigurationException(Code)
Resets the parser configuration.



setDTDContentModelHandler
public void setDTDContentModelHandler(XMLDTDContentModelHandler handler)(Code)
Sets the DTD content model handler.



setDTDHandler
public void setDTDHandler(XMLDTDHandler handler)(Code)
Sets the DTD handler.



setDocumentHandler
public void setDocumentHandler(XMLDocumentHandler handler)(Code)
Sets the document handler.



setEntityResolver
public void setEntityResolver(XMLEntityResolver resolver)(Code)
Sets the entity resolver.



setErrorHandler
public void setErrorHandler(XMLErrorHandler handler)(Code)
Sets the error handler.



setFeature
public void setFeature(String featureId, boolean state) throws XMLConfigurationException(Code)
Sets a feature.



setInputSource
public void setInputSource(XMLInputSource inputSource) throws XMLConfigurationException, IOException(Code)
Sets the input source for the document to parse.
Parameters:
  inputSource - The document's input source.
exception:
  XMLConfigurationException - Thrown if there is a configuration error when initializing theparser.
exception:
  IOException - Thrown on I/O error.
See Also:   HTMLConfiguration.parse(boolean)



setLocale
public void setLocale(Locale locale)(Code)
Sets the locale.



setProperty
public void setProperty(String propertyId, Object value) throws XMLConfigurationException(Code)
Sets a property.



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