org.apache.xerces.parsers
Class RevalidatingDOMParser

java.lang.Object
  |
  +--org.apache.xerces.framework.XMLParser
        |
        +--org.apache.xerces.parsers.DOMParser
              |
              +--org.apache.xerces.parsers.RevalidatingDOMParser

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

Fields inherited from class org.apache.xerces.parsers.DOMParser
DEFAULT_DOCUMENT_CLASS_NAME, fAmpIndex, fAposIndex, fCurrentElementNode, fCurrentNodeIndex, fDeferredDocumentImpl, fDocument, fDocumentImpl, fDocumentIndex, fDocumentType, fDocumentTypeIndex, fGtIndex, fInCDATA, fLtIndex, fQuotIndex, fWithinElement
 
Fields inherited from class org.apache.xerces.framework.XMLParser
fCurrentElementEntity, fCurrentElementType, fDTDValidator, fElementDepth, fEntityHandler, fErrorReporter, fInElementContent, fNamespacesEnabled, fNamespaceSep, fParseInProgress, fReaderFactory, fScanner, fSchemaValidator, fStringPool, fValidator, SAX2_FEATURES_PREFIX, SAX2_PROPERTIES_PREFIX, XERCES_FEATURES_PREFIX, XERCES_PROPERTIES_PREFIX
 
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, unparsedEntityDecl
 
Methods inherited from class org.apache.xerces.framework.XMLParser
addRecognizer, callCharacters, callComment, callEndDocument, callEndElement, callProcessingInstruction, callStartDocument, callStartElement, changeReaders, commentInDTD, endEntityDecl, expandSystemId, getAllowJavaEncodings, getColumnNumber, getContinueAfterFatalError, getEntityReader, getEntityResolver, getErrorHandler, getExternalGeneralEntities, getExternalParameterEntities, getLineNumber, getLocator, getNamespaces, getPublicId, getReaderDepth, getReaderId, getSchemaValidator, getSystemId, getValidation, getValidationDynamic, getValidationWarnOnDuplicateAttdef, getValidationWarnOnUndeclaredElemdef, isFeatureRecognized, isPropertyRecognized, parse, parse, parseSome, parseSomeSetup, processCharacters, processCharacters, processingInstructionInDTD, processWhitespace, processWhitespace, reportError, scanAttributeName, scanAttValue, scanDoctypeDecl, scanElementType, scanExpectedElementType, setAllowJavaEncodings, setContinueAfterFatalError, setEntityResolver, setErrorHandler, setExternalGeneralEntities, setExternalParameterEntities, setLocale, setLocator, setNamespaces, setReaderDepth, setReaderFactory, setSendCharDataAsCharArray, setValidating, setValidation, setValidationDynamic, setValidationWarnOnDuplicateAttdef, setValidationWarnOnUndeclaredElemdef, startEntityDecl, startReadingFromDocument, startReadingFromEntity, startReadingFromExternalSubset, stopReadingFromExternalSubset, validEncName, validVersionNum
 
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.


Copyright © 1999 Apache XML Project. All Rights Reserved.