Xerces 3.1.1

org.apache.xerces.parsers
Class RevalidatingDOMParser

java.lang.Object
  |
  +--org.apache.xerces.framework.XMLParser
        |
        +--org.apache.xerces.parsers.DOMParser
              |
              +--org.apache.xerces.parsers.RevalidatingDOMParser
All Implemented Interfaces:
XMLDocumentHandler, XMLDocumentHandler.DTDHandler, XMLErrorReporter

public class RevalidatingDOMParser
extends DOMParser

This class is a validating DOM parser which can also "revalidate" a DOM subtree after the document has been parsed.

Version:
 
See Also:
DOMParser

Inner classes inherited from class org.apache.xerces.framework.XMLDocumentHandler
XMLDocumentHandler.DTDHandler
 
Fields inherited from class org.apache.xerces.parsers.DOMParser
DEFAULT_DEFERRED_DOCUMENT_CLASS_NAME, DEFAULT_DOCUMENT_CLASS_NAME, fAmpIndex, fAposIndex, fCurrentElementNode, fCurrentNodeIndex, fDeferredDocumentImpl, fDocument, fDocumentImpl, fDocumentIndex, fDocumentType, fDocumentTypeIndex, fGtIndex, fInCDATA, fInDTD, fLtIndex, fQuotIndex, fWithinElement
 
Fields inherited from class org.apache.xerces.framework.XMLParser
fEntityHandler, fErrorReporter, fGrammarResolver, fParseInProgress, fScanner, fStringPool, fValidator, SAX2_FEATURES_PREFIX, SAX2_PROPERTIES_PREFIX, XERCES_FEATURES_PREFIX, XERCES_PROPERTIES_PREFIX
 
Fields inherited from interface org.apache.xerces.framework.XMLErrorReporter
ERRORTYPE_FATAL_ERROR, ERRORTYPE_RECOVERABLE_ERROR, ERRORTYPE_WARNING
 
Constructor Summary
RevalidatingDOMParser()
           
 
Method Summary
 Node validate(Node node)
          Given a node which is a DOM tree (or subtree), validate the tree against the current DTD.
 
Methods inherited from class org.apache.xerces.parsers.DOMParser
attlistDecl, characters, characters, comment, elementDecl, endCDATA, endDocument, endDTD, endElement, endEntityReference, endNamespaceDeclScope, externalEntityDecl, externalPEDecl, getCreateEntityReferenceNodes, getCurrentElementNode, getDeferNodeExpansion, getDocument, getDocumentClassName, getFeature, getFeaturesRecognized, getIncludeIgnorableWhitespace, getPropertiesRecognized, getProperty, ignorableWhitespace, ignorableWhitespace, init, internalEntityDecl, internalPEDecl, internalSubset, notationDecl, processingInstruction, reset, resetOrCopy, setCreateEntityReferenceNodes, setDeferNodeExpansion, setDocumentClassName, setFeature, setIncludeIgnorableWhitespace, setProperty, startCDATA, startDocument, startDTD, startElement, startEntityReference, startNamespaceDeclScope, textDecl, unparsedEntityDecl, xmlDecl
 
Methods inherited from class org.apache.xerces.framework.XMLParser
addRecognizer, getAllowJavaEncodings, getContinueAfterFatalError, getEntityResolver, getErrorHandler, getExternalGeneralEntities, getExternalParameterEntities, getLoadDTDGrammar, getLocator, getNamespaces, getValidation, getValidationDynamic, getValidationSchema, getValidationWarnOnDuplicateAttdef, getValidationWarnOnUndeclaredElemdef, getXMLString, initHandlers, isFeatureRecognized, isPropertyRecognized, parse, parse, parseSome, parseSomeSetup, reportError, setAllowJavaEncodings, setContinueAfterFatalError, setEntityResolver, setErrorHandler, setExternalGeneralEntities, setExternalParameterEntities, setLoadDTDGrammar, setLocale, setNamespaces, setNormalizeAttributeValues, setReaderFactory, setValidation, setValidationDynamic, setValidationSchema, setValidationWarnOnDuplicateAttdef, setValidationWarnOnUndeclaredElemdef
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RevalidatingDOMParser

public RevalidatingDOMParser()
Method Detail

validate

public final Node validate(Node node)
Given a node which is a DOM tree (or subtree), validate the tree against the current DTD. If the tree is valid, return null. If the subtree is invalid return the highest (closest to the root) and left most node which causes the tree to be invalid.
Parameters:
node - The node representing the root of the DOM subtree to be revalidated.
Returns:
null if the subtree is valid or the first (highest and leftmost) node where the tree is invalid.

Xerces 3.1.1