XML for Java Compatibility API 2.0.13

com.ibm.xml.parser
Interface PreRootHandler


public abstract interface PreRootHandler

An interface for receiving control from the XML4J parser after the internal and/or external DTD subsets are parsed, but before the document's root Element is parsed.

This interface is implemented by application programs which want to modify the specifics of the DTD that the XML document might be validated against.

For example, an application program may want to tune its standardized API description, which is expressed in the form of a DTD, in order to accomodate platform-specific limitations. In this case, the application is registered with the XML4J parser instance, prior to parsing the input stream, by using the addPreRootHandler method. Subsequently, the implemented handlePreRoot method will be invoked by the XML4J parser instance when the input stream is read; the implemented handlePreRoot method is responsible for manipulating the DTD.

Version:
Revision: 84 1.4 src/com/ibm/xml/parser/PreRootHandler.java, parser, xml4j2, xml4j2_0_13
See Also:
Parser.addPIHandler(com.ibm.xml.parser.PIHandler)

Method Summary
 void handlePreRoot(TXDocument document, java.lang.String rootName)
          Interface to be implemented for receiving control after the external and/or internal DTD subsets are parsed, but before the document's root Element is parsed.
 

Method Detail

handlePreRoot

public void handlePreRoot(TXDocument document,
                          java.lang.String rootName)
Interface to be implemented for receiving control after the external and/or internal DTD subsets are parsed, but before the document's root Element is parsed.
Parameters:
document - Root Node of this Document.
rootName - The name of this document's DTD. This value is also known as the DOCTYPE and the root Element Name.
See Also:
Parser.addPreRootHandler(com.ibm.xml.parser.PreRootHandler), TXDocument.getDTD(), DTD

XML for Java Compatibility API 2.0.13