|
XML for Java 2.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.xml.framework.XMLParser
This is the base class of all parsers.
This class implements the Parser
interface. The application can use
the ParserFactory
class to construct a parser from a class name.
This class implements the XMLDocumentTypeHandler
, XMLDocumentHandler
,
and XMLErrorHandler
interfaces. This is provided as a convenience to parser
subclasses so that they can implement these interfaces directly in the subclass instead of
needing a separate class.
XMLParser
,
InputSource
,
Locator
Constructor Summary | |
protected |
XMLParser()
Constructor |
Method Summary | |
protected void |
checkHandlers()
|
void |
error(int errorCode)
|
void |
error1(int errorCode,
int stringIndex1)
|
void |
error2(int errorCode,
int stringIndex1,
int stringIndex2)
|
void |
error3(int errorCode,
int stringIndex1,
int stringIndex2,
int stringIndex3)
|
void |
error4(int errorCode,
int stringIndex1,
int stringIndex2,
int stringIndex3,
int stringIndex4)
|
protected boolean |
errorHandlingEnabled()
|
boolean |
getAllowJavaEncodingName()
|
boolean |
getCheckNamespace()
|
boolean |
getContinueAfterFatalError()
|
XMLDocumentHandler |
getDocumentHandler()
|
XMLDocumentTypeHandler |
getDocumentTypeHandler()
|
XMLEntityHandler |
getEntityHandler()
|
XMLErrorHandler |
getErrorHandler()
|
protected java.lang.String |
getErrorMsgString(java.lang.String errorKey,
java.lang.Object[] errorArgs)
|
protected Locator |
getLocator()
Return the Locator object. |
ParserState |
getParserState()
|
XMLScanner |
getScanner()
|
XMLValidationHandler |
getValidationHandler()
|
boolean |
getWarningOnDuplicateAttDef()
|
protected void |
handleError(java.lang.String errorKey,
java.lang.String errorMsg)
|
protected boolean |
isFatal(java.lang.String errorKey)
|
protected boolean |
isWarning(java.lang.String errorKey)
|
void |
loadCatalog(InputSource source)
Loads the catalog stream specified by the given input source and appends the contents to the catalog. |
void |
parse(InputSource source)
Parses the specified input source. |
void |
parse(java.lang.String systemId)
Parses the input source specified by the given system identifier. |
void |
reset()
|
protected void |
resetOrCopy()
|
boolean |
sendCharDataAsCharArray()
The default for XMLDocumentHandler is to use the StringPool to pass CharData, not char arrays. |
void |
setAllowJavaEncodingName(boolean flag)
|
void |
setCheckNamespace(boolean flag)
|
void |
setContinueAfterFatalError(boolean flag)
|
void |
setDocumentHandler(DocumentHandler handler)
|
protected void |
setDocumentHandler(XMLDocumentHandler handler)
|
protected void |
setDocumentTypeHandler(XMLDocumentTypeHandler handler)
|
void |
setDTDHandler(DTDHandler handler)
|
protected void |
setEntityHandler(XMLEntityHandler handler)
|
void |
setEntityResolver(EntityResolver resolver)
|
void |
setErrorHandler(ErrorHandler handler)
|
void |
setLocale(java.util.Locale locale)
Set the locale to use for messages. |
protected void |
setValidationHandler(XMLValidationHandler handler)
|
void |
setWarningOnDuplicateAttDef(boolean flag)
|
protected void |
useDefaultValidationHandler()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected XMLParser()
Method Detail |
public void reset()
protected void resetOrCopy()
protected void checkHandlers() throws java.lang.Exception
public ParserState getParserState()
public XMLScanner getScanner()
protected Locator getLocator()
Locator
object.public void setAllowJavaEncodingName(boolean flag)
public boolean getAllowJavaEncodingName()
public void setWarningOnDuplicateAttDef(boolean flag)
public boolean getWarningOnDuplicateAttDef()
public void setCheckNamespace(boolean flag)
public boolean getCheckNamespace()
public void setContinueAfterFatalError(boolean flag)
public boolean getContinueAfterFatalError()
protected void setDocumentHandler(XMLDocumentHandler handler)
public XMLDocumentHandler getDocumentHandler()
protected void setDocumentTypeHandler(XMLDocumentTypeHandler handler)
public XMLDocumentTypeHandler getDocumentTypeHandler()
protected void setEntityHandler(XMLEntityHandler handler)
public XMLEntityHandler getEntityHandler()
public XMLErrorHandler getErrorHandler()
protected void setValidationHandler(XMLValidationHandler handler)
public XMLValidationHandler getValidationHandler()
protected void useDefaultValidationHandler()
public void loadCatalog(InputSource source) throws java.lang.Exception
source
- The catalog source.public final void setLocale(java.util.Locale locale) throws SAXException
Parser
interface.locale
- The locale object to use for localization of messages.Parser
public void setEntityResolver(EntityResolver resolver)
public void setDTDHandler(DTDHandler handler)
public void setDocumentHandler(DocumentHandler handler)
public void setErrorHandler(ErrorHandler handler)
public final void parse(InputSource source) throws SAXException, java.io.IOException
source
- The input source.public final void parse(java.lang.String systemId) throws SAXException, java.io.IOException
This method is equivalent to the following:
parse(new InputSource(systemId));
source
- The input source.public boolean sendCharDataAsCharArray()
protected boolean errorHandlingEnabled()
protected void handleError(java.lang.String errorKey, java.lang.String errorMsg) throws java.lang.Exception
protected final java.lang.String getErrorMsgString(java.lang.String errorKey, java.lang.Object[] errorArgs)
protected final boolean isWarning(java.lang.String errorKey)
protected final boolean isFatal(java.lang.String errorKey)
public final void error(int errorCode) throws java.lang.Exception
public final void error1(int errorCode, int stringIndex1) throws java.lang.Exception
public final void error2(int errorCode, int stringIndex1, int stringIndex2) throws java.lang.Exception
public final void error3(int errorCode, int stringIndex1, int stringIndex2, int stringIndex3) throws java.lang.Exception
public final void error4(int errorCode, int stringIndex1, int stringIndex2, int stringIndex3, int stringIndex4) throws java.lang.Exception
|
XML for Java 2.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |