Java Doc for SAXBuilder.java in  » Ajax » zk » org » zkoss » idom » input » 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 » Ajax » zk » org.zkoss.idom.input 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.zkoss.idom.input.SAXBuilder

SAXBuilder
public class SAXBuilder (Code)
The builder based on SAX parsers.

A new instance of SAXHandler is created and configured each time one of the build methods is called.
author:
   tomyeh
See Also:   SAXHandler




Constructor Summary
public  SAXBuilder(SAXParser parser)
     Constructor which reuses a parser.
public  SAXBuilder(boolean nsaware, boolean validate)
     Constructor that creates the parser on-the-fly.
public  SAXBuilder(boolean nsaware, boolean validate, boolean smartIgnore)
     Constructor that creates the parser on-the-fly, that accepts an additional option, smartIgnore.

When parsing XML for input purpose only, it is better to use this constructor with smartIgnore true, and then comments will be ignored CDATA will be coalesced with TEXT.


Method Summary
final public  Documentbuild(File src)
     Build an iDOM tree from a file.
final public  Documentbuild(InputStream src)
     Build an iDOM tree from a input stream.
final public  Documentbuild(InputSource src)
     Build an iDOM tree from a input source.
final public  Documentbuild(String uri)
     Build an iDOM tree from a URI string.
final public  Documentbuild(URL url)
     Build an iDOM tree from a URL.
final public  Documentbuild(Reader src)
     Build an iDOM tree from a Reader.
final public  EntityResolvergetEntityResolver()
     Gets the org.xml.sax.EntityResolver.
final public  ErrorHandlergetErrorHandler()
     Gets the org.xml.sax.ErrorHandler.
final public  IDOMFactorygetIDOMFactory()
     Gets the iDOM factory.
final public  SAXParsergetParser()
     Gets the sax parser.
final public  booleanisCoalescing()
     Indicates whether or not the factory is configured to produce parsers which converts CDATA to Text and appends it to the adjacent (if any) Text node.
final public  booleanisExpandEntityReferences()
     Tests whether to expand entity reference nodes.
final public  booleanisIgnoringComments()
     Indicates whether or not the factory is configured to produce parsers which ignores comments.
final public  booleanisIgnoringElementContentWhitespace()
     Tests whether to ignore whitespaces in element content.
final public  booleanisNamespaceAware()
     Tests whether or not this parser is configured to understand namespaces.
final public  booleanisValidating()
     Tests whether or not this parser is configured to validate XML documents.
protected  SAXHandlernewHandler()
     Creates a Sax Handler.
final public  voidsetCoalescing(boolean coalescing)
     Specifies that the parser produced by this code will convert CDATA to Text and append it to the adjacent (if any) text.
final public  voidsetEntityResolver(org.xml.sax.EntityResolver er)
     Specifies the org.xml.sax.EntityResolver to be used to resolve entities present in the XML docu-ment to be parsed.
final public  voidsetErrorHandler(ErrorHandler eh)
     Specifies the org.xml.sax.ErrorHandler to be used to report errors present in the XML document to be parsed.
final public  voidsetExpandEntityReferences(boolean expand)
     Sets whether to expand entities during parsing. A true means to expand entities as normal content.
final public  voidsetIDOMFactory(IDOMFactory factory)
     Sets the iDOM factory.
final public  voidsetIgnoringComments(boolean ignoreComments)
     Specifies that the parser produced by this code will ignore comments.
final public  voidsetIgnoringElementContentWhitespace(boolean ignore)
     Sets whether the parser should elminate whitespace in element content.


Constructor Detail
SAXBuilder
public SAXBuilder(SAXParser parser)(Code)
Constructor which reuses a parser.



SAXBuilder
public SAXBuilder(boolean nsaware, boolean validate) throws ParserConfigurationException, SAXException(Code)
Constructor that creates the parser on-the-fly.
Parameters:
  nsaware - whether the parser is namespace aware
Parameters:
  validate - whether the parser shall validate the document
exception:
  ParserConfigurationException - if a parser cannot be createdwhich satisfies the requested configuration.
See Also:   SAXBuilder.SAXBuilder(boolean,boolean,boolean)



SAXBuilder
public SAXBuilder(boolean nsaware, boolean validate, boolean smartIgnore) throws ParserConfigurationException, SAXException(Code)
Constructor that creates the parser on-the-fly, that accepts an additional option, smartIgnore.

When parsing XML for input purpose only, it is better to use this constructor with smartIgnore true, and then comments will be ignored CDATA will be coalesced with TEXT. A smaller DOM tree is formed.
Parameters:
  nsaware - whether the parser is namespace aware
Parameters:
  validate - whether the parser shall validate the document
Parameters:
  smartIgnore - whether to ignore comments and ignorable-whitesace(if validate is true), and to coalesce
exception:
  ParserConfigurationException - if a parser cannot be createdwhich satisfies the requested configuration.





Method Detail
build
final public Document build(File src) throws SAXException, IOException(Code)
Build an iDOM tree from a file.



build
final public Document build(InputStream src) throws SAXException, IOException(Code)
Build an iDOM tree from a input stream.



build
final public Document build(InputSource src) throws SAXException, IOException(Code)
Build an iDOM tree from a input source.



build
final public Document build(String uri) throws SAXException, IOException(Code)
Build an iDOM tree from a URI string.



build
final public Document build(URL url) throws SAXException, IOException(Code)
Build an iDOM tree from a URL.



build
final public Document build(Reader src) throws SAXException, IOException(Code)
Build an iDOM tree from a Reader.



getEntityResolver
final public EntityResolver getEntityResolver()(Code)
Gets the org.xml.sax.EntityResolver. the enity resolverr; null to use the default implementation



getErrorHandler
final public ErrorHandler getErrorHandler()(Code)
Gets the org.xml.sax.ErrorHandler. the error handler; null to use the default implementation



getIDOMFactory
final public IDOMFactory getIDOMFactory()(Code)
Gets the iDOM factory. Null for DefaultIDOMFactory.THE.



getParser
final public SAXParser getParser()(Code)
Gets the sax parser.



isCoalescing
final public boolean isCoalescing()(Code)
Indicates whether or not the factory is configured to produce parsers which converts CDATA to Text and appends it to the adjacent (if any) Text node.

Default: false. true if the factory is configured to produce parsers whichconverts CDATA nodes to Text nodesand appends it to the adjacent (if any) Text node; false otherwise.




isExpandEntityReferences
final public boolean isExpandEntityReferences()(Code)
Tests whether to expand entity reference nodes.



isIgnoringComments
final public boolean isIgnoringComments()(Code)
Indicates whether or not the factory is configured to produce parsers which ignores comments.

Default: false. true if the factory is configured to produce parserswhich ignores comments; false otherwise.




isIgnoringElementContentWhitespace
final public boolean isIgnoringElementContentWhitespace()(Code)
Tests whether to ignore whitespaces in element content.



isNamespaceAware
final public boolean isNamespaceAware()(Code)
Tests whether or not this parser is configured to understand namespaces.



isValidating
final public boolean isValidating()(Code)
Tests whether or not this parser is configured to validate XML documents.



newHandler
protected SAXHandler newHandler() throws SAXException(Code)
Creates a Sax Handler. Deriving class might override to provide a subclass of SAXHandler.



setCoalescing
final public void setCoalescing(boolean coalescing)(Code)
Specifies that the parser produced by this code will convert CDATA to Text and append it to the adjacent (if any) text.

Default: false.




setEntityResolver
final public void setEntityResolver(org.xml.sax.EntityResolver er)(Code)
Specifies the org.xml.sax.EntityResolver to be used to resolve entities present in the XML docu-ment to be parsed.

Default: null -- to use the default implementation and behavior.




setErrorHandler
final public void setErrorHandler(ErrorHandler eh)(Code)
Specifies the org.xml.sax.ErrorHandler to be used to report errors present in the XML document to be parsed.

Default: null -- to use the default imple-mentation and behavior.




setExpandEntityReferences
final public void setExpandEntityReferences(boolean expand)(Code)
Sets whether to expand entities during parsing. A true means to expand entities as normal content. A false means to leave entities unexpanded as EntityReference objects.

Default: true.
Parameters:
  expand - whether entity expansion should occur.




setIDOMFactory
final public void setIDOMFactory(IDOMFactory factory)(Code)
Sets the iDOM factory. Null for DefaultIDOMFactory.THE.



setIgnoringComments
final public void setIgnoringComments(boolean ignoreComments)(Code)
Specifies that the parser produced by this code will ignore comments.

Default: false.




setIgnoringElementContentWhitespace
final public void setIgnoringElementContentWhitespace(boolean ignore)(Code)
Sets whether the parser should elminate whitespace in element content. They are known as "ignorable whitespace". Only whitespace which is contained within element content that has an element only content model will be eliminated (see XML Rec 2.10).

For this setting to take effect requires that validation be turned on.

Default: false.
Parameters:
  ignore - Whether to ignore whitespaces in element content.




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.