|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xml.sax.HandlerBase
uk.ac.ic.doc.automed.xml.XMLReader
public class XMLReader
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface uk.ac.ic.doc.automed.xml.XMLifyConstants |
|---|
XMLifyConstants.IgnoreNextElementException |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
XMLReader()
|
|
XMLReader(int bufferSize)
|
|
| Method Summary | |
|---|---|
void |
addSupressedTokenType(int type)
|
void |
addSupressedTokenTypes(int[] types)
|
void |
characters(char[] ch,
int start,
int length)
|
void |
close()
call this if you intend to stop reading tokens and haven't read an END_DOCUMENT or SAX_ERROR token this will not return until the parser thread completes or it times out at which point it throws an XMLReaderException. |
void |
close(int milliseconds)
|
void |
endDocument()
|
void |
endElement(java.lang.String name)
|
void |
error(org.xml.sax.SAXParseException exception)
|
void |
fatalError(org.xml.sax.SAXParseException exception)
|
int |
getBufferSize()
|
boolean |
getDebug()
|
boolean |
getSeparateErrors()
by default, errors are reported through the token stream, for parsing this may not be convenient you can have errors reported through getErrors() instead by setting separateErrors to true |
int[] |
getSupressedTokenTypes()
|
boolean |
getSupressIgnorableWhitespace()
The supressIgnorableWhitespace property and supressTokenTypes list are different in knid. |
boolean |
getThrowErrors()
all errors are reported through the token stream or through the error stream, by setting throwErrors you can have nextToken and peekToken throw an exception if the next token is an error. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
boolean |
isNamespaceAware()
|
boolean |
isTokenTypeSupressed(int type)
|
boolean |
isValidating()
|
XMLToken |
nextError()
If separateErrors is set to true and nextToken() or peekToken() have (or would on next call) returned return null then getNextError will keep returning errors until the list is exhausted at which point it will return null otherwise it will just return null |
XMLToken |
nextToken()
|
XMLToken |
nextToken(int type)
|
XMLToken |
nextToken(int[] types)
|
XMLToken |
nextToken(int[] types,
java.lang.String[] names)
|
XMLToken |
nextToken(int type,
java.lang.String name)
throws an XMLReaderException if the next element or its name is not of the expected type |
void |
notationDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
|
XMLToken |
peekError()
|
XMLToken |
peekToken()
|
void |
processingInstruction(java.lang.String target,
java.lang.String data)
|
void |
removeSupressedTokenType(int type)
|
void |
removeSupressedTokenTypes(int[] types)
|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
|
void |
setDebug(boolean b)
|
void |
setDocumentLocator(org.xml.sax.Locator locator)
|
void |
setNamespaceAware(boolean b)
|
void |
setSeparateErrors(boolean b)
|
void |
setSupressedTokenTypes(int[] types)
|
void |
setSupressIgnorableWhitespace(boolean b)
|
void |
setThrowErrors(boolean b)
|
void |
setValidating(boolean b)
|
void |
skipTokens(int type)
|
void |
skipTokens(int[] types)
|
XMLToken |
skipToNextToken(int type)
|
XMLToken |
skipToNextToken(int[] types)
|
void |
start(org.xml.sax.InputSource is)
|
void |
start(java.lang.String filename)
|
void |
startDocument()
|
void |
startElement(java.lang.String name,
org.xml.sax.AttributeList atts)
|
void |
unparsedEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId,
java.lang.String notationName)
|
void |
warning(org.xml.sax.SAXParseException exception)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLReader()
public XMLReader(int bufferSize)
| Method Detail |
|---|
public int getBufferSize()
public boolean getDebug()
public void setDebug(boolean b)
public boolean getSeparateErrors()
public void setSeparateErrors(boolean b)
public boolean getThrowErrors()
public void setThrowErrors(boolean b)
public boolean getSupressIgnorableWhitespace()
public void setSupressIgnorableWhitespace(boolean b)
public boolean isTokenTypeSupressed(int type)
public int[] getSupressedTokenTypes()
public void setSupressedTokenTypes(int[] types)
public void addSupressedTokenType(int type)
public void addSupressedTokenTypes(int[] types)
public void removeSupressedTokenType(int type)
public void removeSupressedTokenTypes(int[] types)
public boolean isNamespaceAware()
public void setNamespaceAware(boolean b)
public boolean isValidating()
public void setValidating(boolean b)
public void start(java.lang.String filename)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException,
java.lang.IllegalArgumentException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
java.lang.IllegalArgumentException
public void start(org.xml.sax.InputSource is)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException,
java.lang.IllegalArgumentException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
java.lang.IllegalArgumentException
public XMLToken nextError()
throws java.lang.Exception
java.lang.Exception
public XMLToken peekError()
throws java.lang.Exception
java.lang.Exception
public void skipTokens(int type)
throws java.lang.Exception
java.lang.Exception
public void skipTokens(int[] types)
throws java.lang.Exception
java.lang.Exception
public XMLToken skipToNextToken(int type)
throws java.lang.Exception
java.lang.Exception
public XMLToken skipToNextToken(int[] types)
throws java.lang.Exception
java.lang.Exception
public XMLToken nextToken(int type,
java.lang.String name)
throws java.lang.Exception
java.lang.Exception
public XMLToken nextToken(int[] types,
java.lang.String[] names)
throws java.lang.Exception
java.lang.Exception
public XMLToken nextToken(int type)
throws java.lang.Exception
java.lang.Exception
public XMLToken nextToken(int[] types)
throws java.lang.Exception
java.lang.Exception
public XMLToken nextToken()
throws java.lang.Exception
java.lang.Exception
public XMLToken peekToken()
throws java.lang.Exception
java.lang.Exception
public void close()
throws XMLReaderException
XMLReaderException
public void close(int milliseconds)
throws XMLReaderException
XMLReaderException
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException
resolveEntity in interface org.xml.sax.EntityResolverresolveEntity in class org.xml.sax.HandlerBaseorg.xml.sax.SAXException
public void notationDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
notationDecl in interface org.xml.sax.DTDHandlernotationDecl in class org.xml.sax.HandlerBase
public void unparsedEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId,
java.lang.String notationName)
unparsedEntityDecl in interface org.xml.sax.DTDHandlerunparsedEntityDecl in class org.xml.sax.HandlerBasepublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator in interface org.xml.sax.DocumentHandlersetDocumentLocator in class org.xml.sax.HandlerBase
public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.DocumentHandlerstartDocument in class org.xml.sax.HandlerBaseorg.xml.sax.SAXException
public void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.DocumentHandlerendDocument in class org.xml.sax.HandlerBaseorg.xml.sax.SAXException
public void startElement(java.lang.String name,
org.xml.sax.AttributeList atts)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.DocumentHandlerstartElement in class org.xml.sax.HandlerBaseorg.xml.sax.SAXException
public void endElement(java.lang.String name)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.DocumentHandlerendElement in class org.xml.sax.HandlerBaseorg.xml.sax.SAXException
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.DocumentHandlercharacters in class org.xml.sax.HandlerBaseorg.xml.sax.SAXException
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
ignorableWhitespace in interface org.xml.sax.DocumentHandlerignorableWhitespace in class org.xml.sax.HandlerBaseorg.xml.sax.SAXException
public void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
processingInstruction in interface org.xml.sax.DocumentHandlerprocessingInstruction in class org.xml.sax.HandlerBaseorg.xml.sax.SAXException
public void warning(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
warning in interface org.xml.sax.ErrorHandlerwarning in class org.xml.sax.HandlerBaseorg.xml.sax.SAXException
public void error(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
error in interface org.xml.sax.ErrorHandlererror in class org.xml.sax.HandlerBaseorg.xml.sax.SAXException
public void fatalError(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
fatalError in interface org.xml.sax.ErrorHandlerfatalError in class org.xml.sax.HandlerBaseorg.xml.sax.SAXException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||