Home » apache-tomcat-6.0.26-src » org.apache » tomcat » util » digester » [javadoc | source]
org.apache.tomcat.util.digester
public class: Digester [javadoc | source]
java.lang.Object
   org.xml.sax.helpers.DefaultHandler
      org.apache.tomcat.util.digester.Digester

All Implemented Interfaces:
    ErrorHandler, EntityResolver, ContentHandler, DTDHandler

A Digester processes an XML input stream by matching a series of element nesting patterns to execute Rules that have been added prior to the start of parsing. This package was inspired by the XmlMapper class that was part of Tomcat 3.0 and 3.1, but is organized somewhat differently.

See the Digester Developer Guide for more information.

IMPLEMENTATION NOTE - A single Digester instance may only be used within the context of a single thread at a time, and a call to parse() must be completed before another can be initiated even from the same thread.

IMPLEMENTATION NOTE - A bug in Xerces 2.0.2 prevents the support of XML schema. You need Xerces 2.1/2.3 and up to make this class working with XML schema

Field Summary
protected static  PropertySource[] source     
protected  StringBuffer bodyText    The body text of the current element. 
protected  ArrayStack bodyTexts    The stack of body text string buffers for surrounding elements. 
protected  ArrayStack matches    Stack whose elements are List objects, each containing a list of Rule objects as returned from Rules.getMatch(). As each xml element in the input is entered, the matching rules are pushed onto this stack. After the end tag is reached, the matches are popped again. The depth of is stack is therefore exactly the same as the current "nesting" level of the input xml.
    since: 1.6 -
 
protected  ClassLoader classLoader    The class loader to use for instantiating application objects. If not specified, the context class loader, or the class loader used to load Digester itself, is used, based on the value of the useContextClassLoader variable. 
protected  boolean configured    Has this Digester been configured yet. 
protected  EntityResolver entityResolver    The EntityResolver used by the SAX parser. By default it use this class 
protected  HashMap entityValidator    The URLs of entityValidator that have been registered, keyed by the public identifier that corresponds. 
protected  ErrorHandler errorHandler    The application-supplied error handler that is notified when parsing warnings, errors, or fatal errors occur. 
protected  SAXParserFactory factory    The SAXParserFactory that is created the first time we need it. 
protected  String JAXP_SCHEMA_LANGUAGE   
     
    protected  Locator locator    The Locator associated with our parser. 
    protected  String match    The current match pattern for nested element processing. 
    protected  boolean namespaceAware    Do we want a "namespace aware" parser. 
    protected  HashMap namespaces    Registered namespaces we are currently processing. The key is the namespace prefix that was declared in the document. The value is an ArrayStack of the namespace URIs this prefix has been mapped to -- the top Stack element is the most current one. (This architecture is required because documents can declare nested uses of the same prefix for different Namespace URIs). 
    protected  ArrayStack params    The parameters stack being utilized by CallMethodRule and CallParamRule rules. 
    protected  SAXParser parser    The SAXParser we will use to parse the input stream. 
    protected  String publicId    The public identifier of the DTD we are currently parsing under (if any). 
    protected  XMLReader reader    The XMLReader used to parse digester rules. 
    protected  Object root    The "root" element of the stack (in other words, the last object that was popped. 
    protected  Rules rules    The Rules implementation containing our collection of Rule instances and associated matching policy. If not established before the first rule is added, a default implementation will be provided. 
    protected  String schemaLanguage    The XML schema language to use for validating an XML instance. By default this value is set to W3C_XML_SCHEMA 
    protected  String schemaLocation    The XML schema to use for validating an XML instance. 
    protected  ArrayStack stack    The object stack being constructed. 
    protected  boolean useContextClassLoader    Do we want to use the Context ClassLoader when loading classes for instantiating new objects. Default is false
    protected  boolean validating    Do we want to use a validating parser. 
    protected  boolean rulesValidation    Warn on missing attributes and elements. 
    protected  Map<String> fakeAttributes    Fake attributes map (attributes are often used for object creation). 
    protected  Log log    The Log to which most logging calls will be made. 
    protected  Log saxLog    The Log to which all SAX event related logging calls will be made. 
    protected static final  String W3C_XML_SCHEMA    The schema language supported. By default, we use this one. 
    Constructor:
     public Digester() 
     public Digester(SAXParser parser) 
      Construct a new Digester, allowing a SAXParser to be passed in. This allows Digester to be used in environments which are unfriendly to JAXP1.1 (such as WebLogic 6.0). Thanks for the request to change go to James House (james@interobjective.com). This may help in places where you are able to load JAXP 1.1 classes yourself.
     public Digester(XMLReader reader) 
      Construct a new Digester, allowing an XMLReader to be passed in. This allows Digester to be used in environments which are unfriendly to JAXP1.1 (such as WebLogic 6.0). Note that if you use this option you have to configure namespace and validation support yourself, as these properties only affect the SAXParser and emtpy constructor.
    Method from org.apache.tomcat.util.digester.Digester Summary:
    addCallMethod,   addCallMethod,   addCallMethod,   addCallMethod,   addCallParam,   addCallParam,   addCallParam,   addCallParam,   addCallParamPath,   addFactoryCreate,   addFactoryCreate,   addFactoryCreate,   addFactoryCreate,   addFactoryCreate,   addFactoryCreate,   addFactoryCreate,   addFactoryCreate,   addFactoryCreate,   addFactoryCreate,   addObjectCreate,   addObjectCreate,   addObjectCreate,   addObjectCreate,   addObjectParam,   addRule,   addRuleSet,   addSetNext,   addSetNext,   addSetProperties,   addSetProperties,   addSetProperties,   addSetProperty,   addSetRoot,   addSetRoot,   addSetTop,   addSetTop,   characters,   clear,   configure,   createSAXException,   createSAXException,   createSAXException,   endDocument,   endElement,   endPrefixMapping,   error,   fatalError,   findNamespaceURI,   getClassLoader,   getCount,   getCurrentElementName,   getDebug,   getDocumentLocator,   getEntityResolver,   getErrorHandler,   getFactory,   getFakeAttributes,   getFeature,   getLogger,   getMatch,   getNamespaceAware,   getParser,   getProperty,   getPublicId,   getReader,   getRegistrations,   getRoot,   getRuleNamespaceURI,   getRules,   getRules,   getRulesValidation,   getSAXLogger,   getSchema,   getSchemaLanguage,   getUseContextClassLoader,   getValidating,   getXMLReader,   ignorableWhitespace,   initialize,   isEmpty,   isFakeAttribute,   log,   log,   notationDecl,   parse,   parse,   parse,   parse,   parse,   peek,   peek,   peek,   peekParams,   peekParams,   pop,   pop,   popParams,   processingInstruction,   push,   push,   pushParams,   register,   reset,   resolveEntity,   setClassLoader,   setDebug,   setDocumentLocator,   setEntityResolver,   setErrorHandler,   setFakeAttributes,   setFeature,   setLogger,   setNamespaceAware,   setProperty,   setPublicId,   setRuleNamespaceURI,   setRules,   setRulesValidation,   setSAXLogger,   setSchema,   setSchemaLanguage,   setUseContextClassLoader,   setValidating,   skippedEntity,   startDocument,   startElement,   startPrefixMapping,   unparsedEntityDecl,   warning
    Methods from org.xml.sax.helpers.DefaultHandler:
    characters,   endDocument,   endElement,   endPrefixMapping,   error,   fatalError,   ignorableWhitespace,   notationDecl,   processingInstruction,   resolveEntity,   setDocumentLocator,   skippedEntity,   startDocument,   startElement,   startPrefixMapping,   unparsedEntityDecl,   warning
    Methods from java.lang.Object:
    clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
    Method from org.apache.tomcat.util.digester.Digester Detail:
     public  void addCallMethod(String pattern,
        String methodName) 
      Add an "call method" rule for a method which accepts no arguments.
     public  void addCallMethod(String pattern,
        String methodName,
        int paramCount) 
      Add an "call method" rule for the specified parameters.
     public  void addCallMethod(String pattern,
        String methodName,
        int paramCount,
        String[] paramTypes) 
      Add an "call method" rule for the specified parameters. If paramCount is set to zero the rule will use the body of the matched element as the single argument of the method, unless paramTypes is null or empty, in this case the rule will call the specified method with no arguments.
     public  void addCallMethod(String pattern,
        String methodName,
        int paramCount,
        Class[] paramTypes) 
      Add an "call method" rule for the specified parameters. If paramCount is set to zero the rule will use the body of the matched element as the single argument of the method, unless paramTypes is null or empty, in this case the rule will call the specified method with no arguments.
     public  void addCallParam(String pattern,
        int paramIndex) 
      Add a "call parameter" rule for the specified parameters.
     public  void addCallParam(String pattern,
        int paramIndex,
        String attributeName) 
      Add a "call parameter" rule for the specified parameters.
     public  void addCallParam(String pattern,
        int paramIndex,
        boolean fromStack) 
      Add a "call parameter" rule. This will either take a parameter from the stack or from the current element body text.
     public  void addCallParam(String pattern,
        int paramIndex,
        int stackIndex) 
      Add a "call parameter" rule that sets a parameter from the stack. This takes a parameter from the given position on the stack.
     public  void addCallParamPath(String pattern,
        int paramIndex) 
      Add a "call parameter" rule that sets a parameter from the current Digester matching path. This is sometimes useful when using rules that support wildcards.
     public  void addFactoryCreate(String pattern,
        String className) 
      Add a "factory create" rule for the specified parameters. Exceptions thrown during the object creation process will be propagated.
     public  void addFactoryCreate(String pattern,
        Class clazz) 
      Add a "factory create" rule for the specified parameters. Exceptions thrown during the object creation process will be propagated.
     public  void addFactoryCreate(String pattern,
        ObjectCreationFactory creationFactory) 
      Add a "factory create" rule for the specified parameters. Exceptions thrown during the object creation process will be propagated.
     public  void addFactoryCreate(String pattern,
        String className,
        String attributeName) 
      Add a "factory create" rule for the specified parameters. Exceptions thrown during the object creation process will be propagated.
     public  void addFactoryCreate(String pattern,
        Class clazz,
        String attributeName) 
      Add a "factory create" rule for the specified parameters. Exceptions thrown during the object creation process will be propagated.
     public  void addFactoryCreate(String pattern,
        String className,
        boolean ignoreCreateExceptions) 
      Add a "factory create" rule for the specified parameters.
     public  void addFactoryCreate(String pattern,
        Class clazz,
        boolean ignoreCreateExceptions) 
      Add a "factory create" rule for the specified parameters.
     public  void addFactoryCreate(String pattern,
        ObjectCreationFactory creationFactory,
        boolean ignoreCreateExceptions) 
      Add a "factory create" rule for the specified parameters.
     public  void addFactoryCreate(String pattern,
        String className,
        String attributeName,
        boolean ignoreCreateExceptions) 
      Add a "factory create" rule for the specified parameters.
     public  void addFactoryCreate(String pattern,
        Class clazz,
        String attributeName,
        boolean ignoreCreateExceptions) 
      Add a "factory create" rule for the specified parameters.
     public  void addObjectCreate(String pattern,
        String className) 
      Add an "object create" rule for the specified parameters.
     public  void addObjectCreate(String pattern,
        Class clazz) 
      Add an "object create" rule for the specified parameters.
     public  void addObjectCreate(String pattern,
        String className,
        String attributeName) 
      Add an "object create" rule for the specified parameters.
     public  void addObjectCreate(String pattern,
        String attributeName,
        Class clazz) 
      Add an "object create" rule for the specified parameters.
     public  void addObjectParam(String pattern,
        int paramIndex,
        Object paramObj) 
      Add a "call parameter" rule that sets a parameter from a caller-provided object. This can be used to pass constants such as strings to methods; it can also be used to pass mutable objects, providing ways for objects to do things like "register" themselves with some shared object.

      Note that when attempting to locate a matching method to invoke, the true type of the paramObj is used, so that despite the paramObj being passed in here as type Object, the target method can declare its parameters as being the true type of the object (or some ancestor type, according to the usual type-conversion rules).

     public  void addRule(String pattern,
        Rule rule) 

      Register a new Rule matching the specified pattern. This method sets the Digester property on the rule.

     public  void addRuleSet(RuleSet ruleSet) 
      Register a set of Rule instances defined in a RuleSet.
     public  void addSetNext(String pattern,
        String methodName) 
      Add a "set next" rule for the specified parameters.
     public  void addSetNext(String pattern,
        String methodName,
        String paramType) 
      Add a "set next" rule for the specified parameters.
     public  void addSetProperties(String pattern) 
      Add a "set properties" rule for the specified parameters.
     public  void addSetProperties(String pattern,
        String attributeName,
        String propertyName) 
     public  void addSetProperties(String pattern,
        String[] attributeNames,
        String[] propertyNames) 
     public  void addSetProperty(String pattern,
        String name,
        String value) 
      Add a "set property" rule for the specified parameters.
     public  void addSetRoot(String pattern,
        String methodName) 
     public  void addSetRoot(String pattern,
        String methodName,
        String paramType) 
     public  void addSetTop(String pattern,
        String methodName) 
      Add a "set top" rule for the specified parameters.
     public  void addSetTop(String pattern,
        String methodName,
        String paramType) 
      Add a "set top" rule for the specified parameters.
     public  void characters(char[] buffer,
        int start,
        int length) throws SAXException 
      Process notification of character data received from the body of an XML element.
     public  void clear() 
      Clear the current contents of the object stack.

      Calling this method might allow another document of the same type to be correctly parsed. However this method was not intended for this purpose. In general, a separate Digester object should be created for each document to be parsed.

     protected  void configure() 

      Provide a hook for lazy configuration of this Digester instance. The default implementation does nothing, but subclasses can override as needed.

      Note This method may be called more than once. Once only initialization code should be placed in #initialize or the code should take responsibility by checking and setting the #configured flag.

     public SAXException createSAXException(Exception e) 
      Create a SAX exception which also understands about the location in the digester file where the exception occurs
     public SAXException createSAXException(String message) 
      Create a SAX exception which also understands about the location in the digester file where the exception occurs
     public SAXException createSAXException(String message,
        Exception e) 
      Create a SAX exception which also understands about the location in the digester file where the exception occurs
     public  void endDocument() throws SAXException 
      Process notification of the end of the document being reached.
     public  void endElement(String namespaceURI,
        String localName,
        String qName) throws SAXException 
      Process notification of the end of an XML element being reached.
     public  void endPrefixMapping(String prefix) throws SAXException 
      Process notification that a namespace prefix is going out of scope.
     public  void error(SAXParseException exception) throws SAXException 
      Forward notification of a parsing error to the application supplied error handler (if any).
     public  void fatalError(SAXParseException exception) throws SAXException 
      Forward notification of a fatal parsing error to the application supplied error handler (if any).
     public String findNamespaceURI(String prefix) 
      Return the currently mapped namespace URI for the specified prefix, if any; otherwise return null. These mappings come and go dynamically as the document is parsed.
     public ClassLoader getClassLoader() 
      Return the class loader to be used for instantiating application objects when required. This is determined based upon the following rules:
      • The class loader set by setClassLoader(), if any
      • The thread context class loader, if it exists and the useContextClassLoader property is set to true
      • The class loader used to load the Digester class itself.
     public int getCount() 
      Return the current depth of the element stack.
     public String getCurrentElementName() 
      Return the name of the XML element that is currently being processed.
     public int getDebug() 
    Deprecated! This - method now always returns 0. This copy of Digester uses JULI; see the documentation for that library for more information.

      Return the debugging detail level of our currently enabled logger.
     public Locator getDocumentLocator() 
      Gets the document locator associated with our parser.
     public EntityResolver getEntityResolver() 
      Return the Entity Resolver used by the SAX parser.
     public ErrorHandler getErrorHandler() 
      Return the error handler for this Digester.
     public SAXParserFactory getFactory() 
      Return the SAXParserFactory we will use, creating one if necessary.
     public Map<String> getFakeAttributes() 
      Return the fake attributes list.
     public boolean getFeature(String feature) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException 
     public Log getLogger() 
      Return the current Logger associated with this instance of the Digester
     public String getMatch() 
      Return the current rule match path
     public boolean getNamespaceAware() 
      Return the "namespace aware" flag for parsers we create.
     public SAXParser getParser() 
      Return the SAXParser we will use to parse the input stream. If there is a problem creating the parser, return null.
     public Object getProperty(String property) throws SAXNotRecognizedException, SAXNotSupportedException 
     public String getPublicId() 
      Return the public identifier of the DTD we are currently parsing under, if any.
     public XMLReader getReader() 
    Deprecated! Use - getXMLReader() instead, which can throw a SAXException if the reader cannot be instantiated

      By setting the reader in the constructor, you can bypass JAXP and be able to use digester in Weblogic 6.0.
     Map getRegistrations() 
      Return the set of DTD URL registrations, keyed by public identifier.
     public Object getRoot() 
      When the Digester is being used as a SAXContentHandler, this method allows you to access the root object that has been created after parsing.
     public String getRuleNamespaceURI() 
      Return the namespace URI that will be applied to all subsequently added Rule objects.
     public Rules getRules() 
      Return the Rules implementation object containing our rules collection and associated matching policy. If none has been established, a default implementation will be created and returned.
     List getRules(String match) 
    Deprecated! Call - match() on the Rules implementation returned by getRules()

      Return the set of rules that apply to the specified match position. The selected rules are those that match exactly, or those rules that specify a suffix match and the tail of the rule matches the current match position. Exact matches have precedence over suffix matches, then (among suffix matches) the longest match is preferred.
     public boolean getRulesValidation() 
      Return the rules validation flag.
     public Log getSAXLogger() 
      Gets the logger used for logging SAX-related information. Note the output is finely grained.
     public String getSchema() 
      Return the XML Schema URI used for validating an XML instance.
     public String getSchemaLanguage() 
      Return the XML Schema language used when parsing.
     public boolean getUseContextClassLoader() 
      Return the boolean as to whether the context classloader should be used.
     public boolean getValidating() 
      Return the validating parser flag.
     public XMLReader getXMLReader() throws SAXException 
      Return the XMLReader to be used for parsing the input document. FIX ME: there is a bug in JAXP/XERCES that prevent the use of a parser that contains a schema with a DTD.
     public  void ignorableWhitespace(char[] buffer,
        int start,
        int len) throws SAXException 
      Process notification of ignorable whitespace received from the body of an XML element.
     protected  void initialize() 

      Provides a hook for lazy initialization of this Digester instance. The default implementation does nothing, but subclasses can override as needed. Digester (by default) only calls this method once.

      Note This method will be called by #configure only when the #configured flag is false. Subclasses that override configure or who set configured may find that this method may be called more than once.

     public boolean isEmpty(String stackName) 

      Is the stack with the given name empty?

      Note: a stack is considered empty if no objects have been pushed onto it yet.

     public boolean isFakeAttribute(Object object,
        String name) 
      Determine if an attribute is a fake attribute.
     public  void log(String message) 
    Deprecated! Call - getLogger() and use it's logging methods

      Log a message to our associated logger.
     public  void log(String message,
        Throwable exception) 
    Deprecated! Call - getLogger() and use it's logging methods

      Log a message and exception to our associated logger.
     public  void notationDecl(String name,
        String publicId,
        String systemId) 
      Receive notification of a notation declaration event.
     public Object parse(File file) throws IOException, SAXException 
      Parse the content of the specified file using this Digester. Returns the root element from the object stack (if any).
     public Object parse(InputSource input) throws IOException, SAXException 
      Parse the content of the specified input source using this Digester. Returns the root element from the object stack (if any).
     public Object parse(InputStream input) throws IOException, SAXException 
      Parse the content of the specified input stream using this Digester. Returns the root element from the object stack (if any).
     public Object parse(Reader reader) throws IOException, SAXException 
      Parse the content of the specified reader using this Digester. Returns the root element from the object stack (if any).
     public Object parse(String uri) throws IOException, SAXException 
      Parse the content of the specified URI using this Digester. Returns the root element from the object stack (if any).
     public Object peek() 
      Return the top object on the stack without removing it. If there are no objects on the stack, return null.
     public Object peek(int n) 
      Return the n'th object down the stack, where 0 is the top element and [getCount()-1] is the bottom element. If the specified index is out of range, return null.
     public Object peek(String stackName) 

      Gets the top object from the stack with the given name. This method does not remove the object from the stack.

      Note: a stack is considered empty if no objects have been pushed onto it yet.

     public Object peekParams() 

      Return the top object on the parameters stack without removing it. If there are no objects on the stack, return null.

      The parameters stack is used to store CallMethodRule parameters. See #params .

     public Object peekParams(int n) 

      Return the n'th object down the parameters stack, where 0 is the top element and [getCount()-1] is the bottom element. If the specified index is out of range, return null.

      The parameters stack is used to store CallMethodRule parameters. See #params .

     public Object pop() 
      Pop the top object off of the stack, and return it. If there are no objects on the stack, return null.
     public Object pop(String stackName) 

      Pops (gets and removes) the top object from the stack with the given name.

      Note: a stack is considered empty if no objects have been pushed onto it yet.

     public Object popParams() 

      Pop the top object off of the parameters stack, and return it. If there are no objects on the stack, return null.

      The parameters stack is used to store CallMethodRule parameters. See #params .

     public  void processingInstruction(String target,
        String data) throws SAXException 
      Process notification of a processing instruction that was encountered.
     public  void push(Object object) 
      Push a new object onto the top of the object stack.
     public  void push(String stackName,
        Object value) 
      Pushes the given object onto the stack with the given name. If no stack already exists with the given name then one will be created.
     public  void pushParams(Object object) 

      Push a new object onto the top of the parameters stack.

      The parameters stack is used to store CallMethodRule parameters. See #params .

     public  void register(String publicId,
        String entityURL) 

      Register the specified DTD URL for the specified public identifier. This must be called before the first call to parse().

      Digester contains an internal EntityResolver implementation. This maps PUBLICID's to URLs (from which the resource will be loaded). A common use case for this method is to register local URLs (possibly computed at runtime by a classloader) for DTDs. This allows the performance advantage of using a local version without having to ensure every SYSTEM URI on every processed xml document is local. This implementation provides only basic functionality. If more sophisticated features are required, using #setEntityResolver to set a custom resolver is recommended.

      Note: This method will have no effect when a custom EntityResolver has been set. (Setting a custom EntityResolver overrides the internal implementation.)

     public  void reset() 
     public InputSource resolveEntity(String publicId,
        String systemId) throws SAXException 
      Resolve the requested external entity.
     public  void setClassLoader(ClassLoader classLoader) 
      Set the class loader to be used for instantiating application objects when required.
     public  void setDebug(int debug) 
    Deprecated! This - method now has no effect at all. This copy of Digester uses JULI; see the documentation for that library for more information.

      Set the debugging detail level of our currently enabled logger.
     public  void setDocumentLocator(Locator locator) 
      Sets the document locator associated with our parser.
     public  void setEntityResolver(EntityResolver entityResolver) 
      Set the EntityResolver used by SAX when resolving public id and system id. This must be called before the first call to parse().
     public  void setErrorHandler(ErrorHandler errorHandler) 
      Set the error handler for this Digester.
     public  void setFakeAttributes(Map<String> fakeAttributes) 
      Set the fake attributes.
     public  void setFeature(String feature,
        boolean value) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException 
     public  void setLogger(Log log) 
      Set the current logger for this Digester.
     public  void setNamespaceAware(boolean namespaceAware) 
      Set the "namespace aware" flag for parsers we create.
     public  void setProperty(String property,
        Object value) throws SAXNotRecognizedException, SAXNotSupportedException 
     public  void setPublicId(String publicId) 
      Set the publid id of the current file being parse.
     public  void setRuleNamespaceURI(String ruleNamespaceURI) 
      Set the namespace URI that will be applied to all subsequently added Rule objects.
     public  void setRules(Rules rules) 
      Set the Rules implementation object containing our rules collection and associated matching policy.
     public  void setRulesValidation(boolean rulesValidation) 
      Set the rules validation flag. This must be called before parse() is called the first time.
     public  void setSAXLogger(Log saxLog) 
      Sets the logger used for logging SAX-related information. Note the output is finely grained.
     public  void setSchema(String schemaLocation) 
      Set the XML Schema URI used for validating a XML Instance.
     public  void setSchemaLanguage(String schemaLanguage) 
      Set the XML Schema language used when parsing. By default, we use W3C.
     public  void setUseContextClassLoader(boolean use) 
      Determine whether to use the Context ClassLoader (the one found by calling Thread.currentThread().getContextClassLoader()) to resolve/load classes that are defined in various rules. If not using Context ClassLoader, then the class-loading defaults to using the calling-class' ClassLoader.
     public  void setValidating(boolean validating) 
      Set the validating parser flag. This must be called before parse() is called the first time.
     public  void skippedEntity(String name) throws SAXException 
      Process notification of a skipped entity.
     public  void startDocument() throws SAXException 
      Process notification of the beginning of the document being reached.
     public  void startElement(String namespaceURI,
        String localName,
        String qName,
        Attributes list) throws SAXException 
      Process notification of the start of an XML element being reached.
     public  void startPrefixMapping(String prefix,
        String namespaceURI) throws SAXException 
      Process notification that a namespace prefix is coming in to scope.
     public  void unparsedEntityDecl(String name,
        String publicId,
        String systemId,
        String notation) 
      Receive notification of an unparsed entity declaration event.
     public  void warning(SAXParseException exception) throws SAXException 
      Forward notification of a parse warning to the application supplied error handler (if any).