com.japisoft.fastparser.sax
Class Sax2Parser

java.lang.Object
  |
  +--com.japisoft.fastparser.Parser
        |
        +--com.japisoft.fastparser.sax.Sax2Parser
All Implemented Interfaces:
org.xml.sax.Locator, org.xml.sax.XMLReader

public final class Sax2Parser
extends Parser
implements org.xml.sax.XMLReader, org.xml.sax.Locator

Sax Level 2 support

This version disables by default the buffering step, for improving the parsing process on file < 100 Ko, use the bufferingMode method to true

Version:
1.2
Author:
(c) 2002-2003 JAPISOFT

Field Summary
 
Fields inherited from class com.japisoft.fastparser.Parser
CONTINUE_PARSING_MODE, HIGH_PARSING_MODE, LOW_PARSING_MODE, MEDIUM_PARSING_MODE
 
Constructor Summary
Sax2Parser()
           
 
Method Summary
 int getColumnNumber()
           
 org.xml.sax.ContentHandler getContentHandler()
           
 org.xml.sax.DTDHandler getDTDHandler()
          No effect without validation support
 org.xml.sax.EntityResolver getEntityResolver()
          No effect without validation support
 org.xml.sax.ErrorHandler getErrorHandler()
           
 boolean getFeature(java.lang.String name)
           
 int getLineNumber()
           
 java.lang.Object getProperty(java.lang.String name)
          Property : no effect
 java.lang.String getPublicId()
           
 java.lang.String getSystemId()
           
static void main(java.lang.String[] args)
           
 void parse(org.xml.sax.InputSource source)
           
 void parse(java.lang.String systemId)
           
 void setContentHandler(org.xml.sax.ContentHandler handler)
          Set the listener for XML processing events
 void setDTDHandler(org.xml.sax.DTDHandler handler)
          No effect without validation support
 void setEntityResolver(org.xml.sax.EntityResolver resolver)
          No effect without validation support
 void setErrorHandler(org.xml.sax.ErrorHandler handler)
           
 void setFeature(java.lang.String name, boolean value)
          Set a Parser feature
 void setProperty(java.lang.String name, java.lang.Object value)
          Property : no effect
 
Methods inherited from class com.japisoft.fastparser.Parser
bufferingMode, cdataEnabled, getDocument, getDocumentBuilder, getNodeFactory, getParsingMode, hasBufferingMode, interruptParsing, isCdataEnabled, isEnabledNameSpace, isMandatoryProlog, isPreserveWhiteSpace, parse, preserveComment, preserveWhiteSpace, setDocumentBuilder, setEnabledNameSpace, setInputStream, setMandatoryProlog, setNodeFactory, setParsingMode, setText
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sax2Parser

public Sax2Parser()
Method Detail

getFeature

public boolean getFeature(java.lang.String name)
                   throws org.xml.sax.SAXNotRecognizedException,
                          org.xml.sax.SAXNotSupportedException
Specified by:
getFeature in interface org.xml.sax.XMLReader
Returns:
true if a feature is supported
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

setFeature

public void setFeature(java.lang.String name,
                       boolean value)
                throws org.xml.sax.SAXNotRecognizedException,
                       org.xml.sax.SAXNotSupportedException
Set a Parser feature

Specified by:
setFeature in interface org.xml.sax.XMLReader
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

getProperty

public java.lang.Object getProperty(java.lang.String name)
                             throws org.xml.sax.SAXNotRecognizedException,
                                    org.xml.sax.SAXNotSupportedException
Property : no effect

Specified by:
getProperty in interface org.xml.sax.XMLReader
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws org.xml.sax.SAXNotRecognizedException,
                        org.xml.sax.SAXNotSupportedException
Property : no effect

Specified by:
setProperty in interface org.xml.sax.XMLReader
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver resolver)
No effect without validation support

Specified by:
setEntityResolver in interface org.xml.sax.XMLReader

getEntityResolver

public org.xml.sax.EntityResolver getEntityResolver()
No effect without validation support

Specified by:
getEntityResolver in interface org.xml.sax.XMLReader

setDTDHandler

public void setDTDHandler(org.xml.sax.DTDHandler handler)
No effect without validation support

Specified by:
setDTDHandler in interface org.xml.sax.XMLReader

getDTDHandler

public org.xml.sax.DTDHandler getDTDHandler()
No effect without validation support

Specified by:
getDTDHandler in interface org.xml.sax.XMLReader

setContentHandler

public void setContentHandler(org.xml.sax.ContentHandler handler)
Set the listener for XML processing events

Specified by:
setContentHandler in interface org.xml.sax.XMLReader

getContentHandler

public org.xml.sax.ContentHandler getContentHandler()
Specified by:
getContentHandler in interface org.xml.sax.XMLReader
Returns:
the listener for XML processing events

setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler handler)
Specified by:
setErrorHandler in interface org.xml.sax.XMLReader

getErrorHandler

public org.xml.sax.ErrorHandler getErrorHandler()
Specified by:
getErrorHandler in interface org.xml.sax.XMLReader

parse

public void parse(org.xml.sax.InputSource source)
           throws java.io.IOException,
                  org.xml.sax.SAXException
Specified by:
parse in interface org.xml.sax.XMLReader
java.io.IOException
org.xml.sax.SAXException

parse

public void parse(java.lang.String systemId)
           throws java.io.IOException,
                  org.xml.sax.SAXException
Specified by:
parse in interface org.xml.sax.XMLReader
java.io.IOException
org.xml.sax.SAXException

getColumnNumber

public int getColumnNumber()
Specified by:
getColumnNumber in interface org.xml.sax.Locator

getLineNumber

public int getLineNumber()
Specified by:
getLineNumber in interface org.xml.sax.Locator

getPublicId

public java.lang.String getPublicId()
Specified by:
getPublicId in interface org.xml.sax.Locator

getSystemId

public java.lang.String getSystemId()
Specified by:
getSystemId in interface org.xml.sax.Locator

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
java.lang.Exception