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


java.lang.Object
   org.cyberneko.html.filters.DefaultFilter
      sample.Script

Script
public class Script extends DefaultFilter (Code)
This sample demonstrates how to use of the pushInputSource method of the HTMLConfiguration in order to dynamically insert content into the HTML stream. The typical use for this functionality is to insert the result of an embedded script into the HTML document in place of the script.

This particular example defines a new script language called "NekoHTML" script that is a tiny subset of the NSGMLS format. The following table enumerates the NSGMLS features supported by this script language:
(nameA start element with the specified name.
"textCharacter content with the specified text.
)nameAn end element with the specified name.

In this format, every command is specified on a line by itself. For example, the following document:

 <script type='NekoHTML'>
 (h1
 "Header
 )h1
 </script>
 
is equivalent to the following HTML document:
 <H1>Header</H1>
 
as seen by document handler registered with the parser, when processed by this filter.
author:
   Andy Clark
version:
   $Id: Script.java,v 1.3 2004/02/19 20:00:17 andyc Exp $


Field Summary
final protected static  StringAUGMENTATIONS
     Augmentations feature identifier.
final protected static  StringFILTERS
     Filters property identifier.
final protected static  StringSCRIPT_TYPE
     Script type ("text/x-nekoscript").
protected  StringBufferfBuffer
     A string buffer to collect the "script".
protected  HTMLConfigurationfConfiguration
     The NekoHTML configuration.
protected  intfScriptCount
     The script count.
protected  StringfSystemId
     The system identifier of the source document.

Constructor Summary
public  Script(HTMLConfiguration config)
     Constructs a script object with the specified configuration.

Method Summary
public  voidcharacters(XMLString text, Augmentations augs)
     Characters.
public  voidemptyElement(QName element, XMLAttributes attrs, Augmentations augs)
     Empty element.
public  voidendElement(QName element, Augmentations augs)
     End element.
public static  voidmain(String[] argv)
     Main.
public  voidstartDocument(XMLLocator locator, String encoding, Augmentations augs)
     Start document.
public  voidstartElement(QName element, XMLAttributes attrs, Augmentations augs)
     Start element.

Field Detail
AUGMENTATIONS
final protected static String AUGMENTATIONS(Code)
Augmentations feature identifier.



FILTERS
final protected static String FILTERS(Code)
Filters property identifier.



SCRIPT_TYPE
final protected static String SCRIPT_TYPE(Code)
Script type ("text/x-nekoscript").



fBuffer
protected StringBuffer fBuffer(Code)
A string buffer to collect the "script".



fConfiguration
protected HTMLConfiguration fConfiguration(Code)
The NekoHTML configuration.



fScriptCount
protected int fScriptCount(Code)
The script count.



fSystemId
protected String fSystemId(Code)
The system identifier of the source document.




Constructor Detail
Script
public Script(HTMLConfiguration config)(Code)
Constructs a script object with the specified configuration.




Method Detail
characters
public void characters(XMLString text, Augmentations augs) throws XNIException(Code)
Characters.



emptyElement
public void emptyElement(QName element, XMLAttributes attrs, Augmentations augs) throws XNIException(Code)
Empty element.



endElement
public void endElement(QName element, Augmentations augs) throws XNIException(Code)
End element.



main
public static void main(String[] argv) throws Exception(Code)
Main.



startDocument
public void startDocument(XMLLocator locator, String encoding, Augmentations augs) throws XNIException(Code)
Start document.



startElement
public void startElement(QName element, XMLAttributes attrs, Augmentations augs) throws XNIException(Code)
Start element.



Fields inherited from org.cyberneko.html.filters.DefaultFilter
protected XMLDocumentHandler fDocumentHandler(Code)(Java Doc)
protected XMLDocumentSource fDocumentSource(Code)(Java Doc)

Methods inherited from org.cyberneko.html.filters.DefaultFilter
public void characters(XMLString text, Augmentations augs) throws XNIException(Code)(Java Doc)
public void comment(XMLString text, Augmentations augs) throws XNIException(Code)(Java Doc)
public void doctypeDecl(String root, String publicId, String systemId, Augmentations augs) throws XNIException(Code)(Java Doc)
public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException(Code)(Java Doc)
public void endCDATA(Augmentations augs) throws XNIException(Code)(Java Doc)
public void endDocument(Augmentations augs) throws XNIException(Code)(Java Doc)
public void endElement(QName element, Augmentations augs) throws XNIException(Code)(Java Doc)
public void endGeneralEntity(String name, Augmentations augs) throws XNIException(Code)(Java Doc)
public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException(Code)(Java Doc)
public XMLDocumentHandler getDocumentHandler()(Code)(Java Doc)
public XMLDocumentSource getDocumentSource()(Code)(Java Doc)
public Boolean getFeatureDefault(String featureId)(Code)(Java Doc)
public Object getPropertyDefault(String propertyId)(Code)(Java Doc)
public String[] getRecognizedFeatures()(Code)(Java Doc)
public String[] getRecognizedProperties()(Code)(Java Doc)
public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException(Code)(Java Doc)
protected static String[] merge(String[] array1, String[] array2)(Code)(Java Doc)
public void processingInstruction(String target, XMLString data, Augmentations augs) throws XNIException(Code)(Java Doc)
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException(Code)(Java Doc)
public void setDocumentHandler(XMLDocumentHandler handler)(Code)(Java Doc)
public void setDocumentSource(XMLDocumentSource source)(Code)(Java Doc)
public void setFeature(String featureId, boolean state) throws XMLConfigurationException(Code)(Java Doc)
public void setProperty(String propertyId, Object value) throws XMLConfigurationException(Code)(Java Doc)
public void startCDATA(Augmentations augs) throws XNIException(Code)(Java Doc)
public void startDocument(XMLLocator locator, String encoding, NamespaceContext nscontext, Augmentations augs) throws XNIException(Code)(Java Doc)
public void startDocument(XMLLocator locator, String encoding, Augmentations augs) throws XNIException(Code)(Java Doc)
public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException(Code)(Java Doc)
public void startGeneralEntity(String name, XMLResourceIdentifier id, String encoding, Augmentations augs) throws XNIException(Code)(Java Doc)
public void startPrefixMapping(String prefix, String uri, Augmentations augs) throws XNIException(Code)(Java Doc)
public void textDecl(String version, String encoding, Augmentations augs) throws XNIException(Code)(Java Doc)
public void xmlDecl(String version, String encoding, String standalone, Augmentations augs) throws XNIException(Code)(Java Doc)

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.