Java Doc for SAXParser.java in  » XML » Piccolo » javax » xml » parsers » 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 » XML » Piccolo » javax.xml.parsers 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.xml.parsers.SAXParser

SAXParser
abstract public class SAXParser (Code)
Defines the API that wraps an org.xml.sax.XMLReader implementation class. In JAXP 1.0, this class wrapped the org.xml.sax.Parser interface, however this interface was replaced by the org.xml.sax.XMLReader . For ease of transition, this class continues to support the same name and interface as well as supporting new methods. An instance of this class can be obtained from the javax.xml.parsers.SAXParserFactory.newSAXParser method. Once an instance of this class is obtained, XML can be parsed from a variety of input sources. These input sources are InputStreams, Files, URLs, and SAX InputSources.

As the content is parsed by the underlying parser, methods of the given org.xml.sax.HandlerBase or the org.xml.sax.helpers.DefaultHandler are called.

Implementors of this class which wrap an underlying implementation can consider using the org.xml.sax.helpers.ParserAdapter class to initially adapt their SAX1 impelemntation to work under this revised class.

An implementation of SAXParser is NOT guaranteed to behave as per the specification if it is used concurrently by two or more threads. It is recommended to have one instance of the SAXParser per thread or it is upto the application to make sure about the use of SAXParser from more than one thread.
since:
   JAXP 1.0
version:
   1.0




Constructor Summary
protected  SAXParser()
    

Method Summary
abstract public  org.xml.sax.ParsergetParser()
     Returns the SAX parser that is encapsultated by the implementation of this class.
abstract public  ObjectgetProperty(String name)
     Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader .
Parameters:
  name - The name of the property to be retrieved.
abstract public  org.xml.sax.XMLReadergetXMLReader()
     Returns the org.xml.sax.XMLReader that is encapsulated by the implementation of this class.
abstract public  booleanisNamespaceAware()
     Indicates whether or not this parser is configured to understand namespaces.
abstract public  booleanisValidating()
     Indicates whether or not this parser is configured to validate XML documents.
public  voidparse(InputStream is, HandlerBase hb)
     Parse the content of the given java.io.InputStream instance as XML using the specified org.xml.sax.HandlerBase .
public  voidparse(InputStream is, HandlerBase hb, String systemId)
     Parse the content of the given java.io.InputStream instance as XML using the specified org.xml.sax.HandlerBase .
public  voidparse(InputStream is, DefaultHandler dh)
     Parse the content of the given java.io.InputStream instance as XML using the specified org.xml.sax.helpers.DefaultHandler .
public  voidparse(InputStream is, DefaultHandler dh, String systemId)
     Parse the content of the given java.io.InputStream instance as XML using the specified org.xml.sax.helpers.DefaultHandler .
public  voidparse(String uri, HandlerBase hb)
     Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified org.xml.sax.HandlerBase .
public  voidparse(String uri, DefaultHandler dh)
     Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified org.xml.sax.helpers.DefaultHandler .
public  voidparse(File f, HandlerBase hb)
     Parse the content of the file specified as XML using the specified org.xml.sax.HandlerBase .
public  voidparse(File f, DefaultHandler dh)
     Parse the content of the file specified as XML using the specified org.xml.sax.helpers.DefaultHandler .
public  voidparse(InputSource is, HandlerBase hb)
     Parse the content given org.xml.sax.InputSource as XML using the specified org.xml.sax.HandlerBase .
public  voidparse(InputSource is, DefaultHandler dh)
     Parse the content given org.xml.sax.InputSource as XML using the specified org.xml.sax.helpers.DefaultHandler .
abstract public  voidsetProperty(String name, Object value)
     Sets the particular property in the underlying implementation of org.xml.sax.XMLReader .


Constructor Detail
SAXParser
protected SAXParser()(Code)




Method Detail
getParser
abstract public org.xml.sax.Parser getParser() throws SAXException(Code)
Returns the SAX parser that is encapsultated by the implementation of this class. The SAX parser that is encapsultated by theimplementation of this class.



getProperty
abstract public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader .
Parameters:
  name - The name of the property to be retrieved. Value of the requested property.
exception:
  SAXNotRecognizedException - When the underlying XMLReader doesnot recognize the property name.
exception:
  SAXNotSupportedException - When the underlying XMLReaderrecognizes the property name but doesn't support theproperty.
See Also:   org.xml.sax.XMLReader.getProperty



getXMLReader
abstract public org.xml.sax.XMLReader getXMLReader() throws SAXException(Code)
Returns the org.xml.sax.XMLReader that is encapsulated by the implementation of this class. The XMLReader that is encapsulated by theimplementation of this class.



isNamespaceAware
abstract public boolean isNamespaceAware()(Code)
Indicates whether or not this parser is configured to understand namespaces. true if this parser is configured tounderstand namespaces; false otherwise.



isValidating
abstract public boolean isValidating()(Code)
Indicates whether or not this parser is configured to validate XML documents. true if this parser is configured tovalidate XML documents; false otherwise.



parse
public void parse(InputStream is, HandlerBase hb) throws SAXException, IOException(Code)
Parse the content of the given java.io.InputStream instance as XML using the specified org.xml.sax.HandlerBase . Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0
Parameters:
  is - InputStream containing the content to be parsed.
Parameters:
  hb - The SAX HandlerBase to use.
exception:
  IOException - If any IO errors occur.
exception:
  IllegalArgumentException - If the given InputStream is null.
exception:
  SAXException - If the underlying parser throws aSAXException while parsing.
See Also:   org.xml.sax.DocumentHandler



parse
public void parse(InputStream is, HandlerBase hb, String systemId) throws SAXException, IOException(Code)
Parse the content of the given java.io.InputStream instance as XML using the specified org.xml.sax.HandlerBase . Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0
Parameters:
  is - InputStream containing the content to be parsed.
Parameters:
  hb - The SAX HandlerBase to use.
Parameters:
  systemId - The systemId which is needed for resolving relative URIs.
exception:
  IOException - If any IO errors occur.
exception:
  IllegalArgumentException - If the given InputStream is null.
exception:
  SAXException - If the underlying parser throws aSAXException while parsing.
See Also:   org.xml.sax.DocumentHandler
See Also:   version of this method instead.



parse
public void parse(InputStream is, DefaultHandler dh) throws SAXException, IOException(Code)
Parse the content of the given java.io.InputStream instance as XML using the specified org.xml.sax.helpers.DefaultHandler .
Parameters:
  is - InputStream containing the content to be parsed.
Parameters:
  dh - The SAX DefaultHandler to use.
exception:
  IOException - If any IO errors occur.
exception:
  IllegalArgumentException - If the given InputStream is null.
exception:
  SAXException - If the underlying parser throws aSAXException while parsing.
See Also:   org.xml.sax.DocumentHandler



parse
public void parse(InputStream is, DefaultHandler dh, String systemId) throws SAXException, IOException(Code)
Parse the content of the given java.io.InputStream instance as XML using the specified org.xml.sax.helpers.DefaultHandler .
Parameters:
  is - InputStream containing the content to be parsed.
Parameters:
  dh - The SAX DefaultHandler to use.
Parameters:
  systemId - The systemId which is needed for resolving relative URIs.
exception:
  IOException - If any IO errors occur.
exception:
  IllegalArgumentException - If the given InputStream is null.
exception:
  SAXException - If the underlying parser throws aSAXException while parsing.
See Also:   org.xml.sax.DocumentHandler
See Also:   version of this method instead.



parse
public void parse(String uri, HandlerBase hb) throws SAXException, IOException(Code)
Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified org.xml.sax.HandlerBase . Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0
Parameters:
  uri - The location of the content to be parsed.
Parameters:
  hb - The SAX HandlerBase to use.
exception:
  IOException - If any IO errors occur.
exception:
  IllegalArgumentException - If the uri is null.
exception:
  SAXException - If the underlying parser throws aSAXException while parsing.
See Also:   org.xml.sax.DocumentHandler



parse
public void parse(String uri, DefaultHandler dh) throws SAXException, IOException(Code)
Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified org.xml.sax.helpers.DefaultHandler .
Parameters:
  uri - The location of the content to be parsed.
Parameters:
  dh - The SAX DefaultHandler to use.
exception:
  IOException - If any IO errors occur.
exception:
  IllegalArgumentException - If the uri is null.
exception:
  SAXException - If the underlying parser throws aSAXException while parsing.
See Also:   org.xml.sax.DocumentHandler



parse
public void parse(File f, HandlerBase hb) throws SAXException, IOException(Code)
Parse the content of the file specified as XML using the specified org.xml.sax.HandlerBase . Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0
Parameters:
  f - The file containing the XML to parse
Parameters:
  hb - The SAX HandlerBase to use.
exception:
  IOException - If any IO errors occur.
exception:
  IllegalArgumentException - If the File object is null.
See Also:   org.xml.sax.DocumentHandler
exception:
  SAXException - If the underlying parser throws aSAXException while parsing.



parse
public void parse(File f, DefaultHandler dh) throws SAXException, IOException(Code)
Parse the content of the file specified as XML using the specified org.xml.sax.helpers.DefaultHandler .
Parameters:
  f - The file containing the XML to parse
Parameters:
  dh - The SAX DefaultHandler to use.
exception:
  IOException - If any IO errors occur.
exception:
  IllegalArgumentException - If the File object is null.
exception:
  SAXException - If the underlying parser throws aSAXException while parsing.
See Also:   org.xml.sax.DocumentHandler



parse
public void parse(InputSource is, HandlerBase hb) throws SAXException, IOException(Code)
Parse the content given org.xml.sax.InputSource as XML using the specified org.xml.sax.HandlerBase . Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0
Parameters:
  is - The InputSource containing the content to be parsed.
Parameters:
  hb - The SAX HandlerBase to use.
exception:
  IOException - If any IO errors occur.
exception:
  IllegalArgumentException - If the InputSource is null.
exception:
  SAXException - If the underlying parser throws aSAXException while parsing.
See Also:   org.xml.sax.DocumentHandler



parse
public void parse(InputSource is, DefaultHandler dh) throws SAXException, IOException(Code)
Parse the content given org.xml.sax.InputSource as XML using the specified org.xml.sax.helpers.DefaultHandler .
Parameters:
  is - The InputSource containing the content to be parsed.
Parameters:
  dh - The SAX DefaultHandler to use.
exception:
  IOException - If any IO errors occur.
exception:
  IllegalArgumentException - If the InputSource is null.
exception:
  SAXException - If the underlying parser throws aSAXException while parsing.
See Also:   org.xml.sax.DocumentHandler



setProperty
abstract public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException(Code)
Sets the particular property in the underlying implementation of org.xml.sax.XMLReader . A list of the core features and properties can be found at http://www.megginson.com/SAX/Java/features.html
Parameters:
  name - The name of the property to be set.
Parameters:
  value - The value of the property to be set.
exception:
  SAXNotRecognizedException - When the underlying XMLReader doesnot recognize the property name.
exception:
  SAXNotSupportedException - When the underlying XMLReaderrecognizes the property name but doesn't support theproperty.
See Also:   org.xml.sax.XMLReader.setProperty



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.