public abstract class TSAXDocumentDefaultHandler
extends org.xml.sax.helpers.DefaultHandler
The TSAXDocumentDefaultHandler instance specified for a SAX object model receives events for an XML document obtained from Tamino via the retrieve method or if a TXMLObject instance is created. The document handler should create an instance of the class implementing the TSAXDocument interface associated with the same SAX object model. The following code example shows the usage of a SAX object model and a document handler.
// instantiate a SAX object model with a document handler TSAXObjectModel mySAXObjectModel = new TSAXObjectModel( "MySAXModel" , MySAXDocument.class , null , mySAXDocumentDefaultHandler , null ); // instantiate a TXMLObject for this model TXMLObject xmlObject = TXMLObject.newInstance( mySAXObjectModel ); // fill the instance with data. // reading from an input stream will send SAX events to the document handler. xmlObject.readFrom( someInputStream ); // writing to an output stream requires an appropriate implementation of the // writeTo method of the associate TSAXDocument class. MySaxDocument mySaxDocument = xmlObject.getDocument(); mySaxDocument.writeTo( someOutputStream );
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SPECIFIER
An internal identification for this interface.
|
Constructor and Description |
---|
TSAXDocumentDefaultHandler() |
Modifier and Type | Method and Description |
---|---|
abstract TSAXDocument |
getDocument()
Returns a TSAXDocument representing the single underlying XML document.
|
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
public static final java.lang.String SPECIFIER
public abstract TSAXDocument getDocument()
Copyright (c) 2017 Software AG. All Rights Reserved.