|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.brains2b.saxo.SAXReader
Partial implementation for SAX 2 Parser This is a first version of the SAX 2 Parser, ContentHandler only.
It is written for to be small, fast and SAX 2 compliant.
Other Parsers will all be stronger in one of these areas, so if you need only one: small, speed or SAX 2 compliant you can probably do better.
Nested Class Summary | |
protected class |
SAXReader.Position
an inner class to track the position within the document with. |
Field Summary | |
protected static int |
INTERNAL
|
protected java.lang.String |
m_doc
|
protected int |
m_docType
|
protected static int |
SYSTEM
|
Constructor Summary | |
SAXReader()
|
Method Summary | |
org.xml.sax.ContentHandler |
getContentHandler()
get the content handler for this parser |
org.xml.sax.DTDHandler |
getDTDHandler()
get the dtd for this parser |
org.xml.sax.EntityResolver |
getEntityResolver()
get the entity resolver for this parser |
org.xml.sax.ErrorHandler |
getErrorHandler()
|
boolean |
getFeature(java.lang.String name)
|
protected SAXReader.Position |
getPosition()
return the current position of the reader within the document Easiest way to use is just call toString() on position to have a printable format for the position |
java.lang.Object |
getProperty(java.lang.String name)
|
void |
parse(org.xml.sax.InputSource is)
Main parse function |
void |
parse(java.lang.String fileName)
Main parse function |
void |
setContentHandler(org.xml.sax.ContentHandler handler)
set the ContentHandler. |
void |
setDTDHandler(org.xml.sax.DTDHandler dtd)
sets the DTD Handler (this option is not implemented yet) |
void |
setEntityResolver(org.xml.sax.EntityResolver resolver)
sets the EntityResolver (this option is not implemented yet) |
void |
setErrorHandler(org.xml.sax.ErrorHandler e_handler)
set the ErrorHandler (this option is not implemented yet) |
void |
setFeature(java.lang.String name,
boolean value)
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int SYSTEM
protected static final int INTERNAL
protected int m_docType
protected java.lang.String m_doc
Constructor Detail |
public SAXReader()
Method Detail |
public void setEntityResolver(org.xml.sax.EntityResolver resolver)
setEntityResolver
in interface org.xml.sax.XMLReader
XMLReader.setEntityResolver(EntityResolver)
public void setDTDHandler(org.xml.sax.DTDHandler dtd)
setDTDHandler
in interface org.xml.sax.XMLReader
XMLReader.setDTDHandler(DTDHandler)
public void setContentHandler(org.xml.sax.ContentHandler handler)
setContentHandler
in interface org.xml.sax.XMLReader
XMLReader.setContentHandler(ContentHandler)
public void setErrorHandler(org.xml.sax.ErrorHandler e_handler)
setErrorHandler
in interface org.xml.sax.XMLReader
XMLReader.setErrorHandler(ErrorHandler)
public org.xml.sax.ErrorHandler getErrorHandler()
getErrorHandler
in interface org.xml.sax.XMLReader
public void parse(org.xml.sax.InputSource is) throws org.xml.sax.SAXException, java.io.IOException
parse
in interface org.xml.sax.XMLReader
org.xml.sax.SAXException
java.io.IOException
XMLReader.parse(InputSource)
public void parse(java.lang.String fileName) throws org.xml.sax.SAXException, java.io.IOException
parse
in interface org.xml.sax.XMLReader
org.xml.sax.SAXException
java.io.IOException
XMLReader.parse(String)
protected SAXReader.Position getPosition()
Easiest way to use is just call toString() on position to have a printable format for the position
SAXReader.Position
public org.xml.sax.ContentHandler getContentHandler()
getContentHandler
in interface org.xml.sax.XMLReader
public org.xml.sax.DTDHandler getDTDHandler()
getDTDHandler
in interface org.xml.sax.XMLReader
public org.xml.sax.EntityResolver getEntityResolver()
getEntityResolver
in interface org.xml.sax.XMLReader
public boolean getFeature(java.lang.String name) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
getFeature
in interface org.xml.sax.XMLReader
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public java.lang.Object getProperty(java.lang.String name) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
getProperty
in interface org.xml.sax.XMLReader
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public void setFeature(java.lang.String name, boolean value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
setFeature
in interface org.xml.sax.XMLReader
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public void setProperty(java.lang.String name, java.lang.Object value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
setProperty
in interface org.xml.sax.XMLReader
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |