// Create and initialize the wrapped SAXImpl object
 private void prepareNewDOM() throws SAXException {
   _dom =
       (SAXImpl)
           _dtmManager.getDTM(null, true, _wsfilter, true, false, false, _initSize, _buildIdIndex);
   _dom.startDocument();
   // Flush pending Text nodes to SAXImpl
   for (int i = 0; i < _size; i++) {
     String str = _textArray[i];
     _dom.characters(str.toCharArray(), 0, str.length());
   }
   _size = 0;
 }
  /** The code in some of the following interfaces are copied from SAXAdapter. * */
  private void maybeEmitStartElement() throws SAXException {
    if (_openElementName != null) {

      int index;
      if ((index = _openElementName.indexOf(":")) < 0)
        _dom.startElement(null, _openElementName, _openElementName, _attributes);
      else {
        String uri = _dom.getNamespaceURI(_openElementName.substring(0, index));
        _dom.startElement(
            uri, _openElementName.substring(index + 1), _openElementName, _attributes);
      }

      _openElementName = null;
    }
  }
 public org.w3c.dom.Node getNode(int nodeHandle) {
   if (_dom != null) {
     return _dom.getNode(nodeHandle);
   } else {
     return super.getNode(nodeHandle);
   }
 }
 public boolean isDocumentAllDeclarationsProcessed(int documentHandle) {
   if (_dom != null) {
     return _dom.isDocumentAllDeclarationsProcessed(documentHandle);
   } else {
     return super.isDocumentAllDeclarationsProcessed(documentHandle);
   }
 }
 public boolean isNodeAfter(int firstNodeHandle, int secondNodeHandle) {
   if (_dom != null) {
     return _dom.isNodeAfter(firstNodeHandle, secondNodeHandle);
   } else {
     return super.isNodeAfter(firstNodeHandle, secondNodeHandle);
   }
 }
 public int getElementById(String elementId) {
   if (_dom != null) {
     return _dom.getElementById(elementId);
   } else {
     return super.getElementById(elementId);
   }
 }
 public boolean getDocumentAllDeclarationsProcessed() {
   if (_dom != null) {
     return _dom.getDocumentAllDeclarationsProcessed();
   } else {
     return super.getDocumentAllDeclarationsProcessed();
   }
 }
 public String getDocumentStandalone(int nodeHandle) {
   if (_dom != null) {
     return _dom.getDocumentStandalone(nodeHandle);
   } else {
     return super.getDocumentStandalone(nodeHandle);
   }
 }
 public String getPrefix(int nodeHandle) {
   if (_dom != null) {
     return _dom.getPrefix(nodeHandle);
   } else {
     return super.getPrefix(nodeHandle);
   }
 }
 public String getLocalName(int nodeHandle) {
   if (_dom != null) {
     return _dom.getLocalName(nodeHandle);
   } else {
     return super.getLocalName(nodeHandle);
   }
 }
 public String getNamespaceFromExpandedNameID(int ExpandedNameID) {
   if (_dom != null) {
     return _dom.getNamespaceFromExpandedNameID(ExpandedNameID);
   } else {
     return super.getNamespaceFromExpandedNameID(ExpandedNameID);
   }
 }
 public int getExpandedTypeID(String namespace, String localName, int type) {
   if (_dom != null) {
     return _dom.getExpandedTypeID(namespace, localName, type);
   } else {
     return super.getExpandedTypeID(namespace, localName, type);
   }
 }
 public char[] getStringValueChunk(int nodeHandle, int chunkIndex, int[] startAndLen) {
   if (_dom != null) {
     return _dom.getStringValueChunk(nodeHandle, chunkIndex, startAndLen);
   } else {
     return super.getStringValueChunk(nodeHandle, chunkIndex, startAndLen);
   }
 }
 public int getStringValueChunkCount(int nodeHandle) {
   if (_dom != null) {
     return _dom.getStringValueChunkCount(nodeHandle);
   } else {
     return super.getStringValueChunkCount(nodeHandle);
   }
 }
 public int getDocumentRoot(int nodeHandle) {
   if (_dom != null) {
     return _dom.getDocumentRoot(nodeHandle);
   } else {
     return super.getDocumentRoot(nodeHandle);
   }
 }
 public String getDocumentSystemIdentifier(int nodeHandle) {
   if (_dom != null) {
     return _dom.getDocumentSystemIdentifier(nodeHandle);
   } else {
     return super.getDocumentSystemIdentifier(nodeHandle);
   }
 }
 public String getDocumentEncoding(int nodeHandle) {
   if (_dom != null) {
     return _dom.getDocumentEncoding(nodeHandle);
   } else {
     return super.getDocumentEncoding(nodeHandle);
   }
 }
 public String getNamespaceURI(int nodeHandle) {
   if (_dom != null) {
     return _dom.getNamespaceURI(nodeHandle);
   } else {
     return super.getNamespaceURI(nodeHandle);
   }
 }
 public String getDocumentVersion(int documentHandle) {
   if (_dom != null) {
     return _dom.getDocumentVersion(documentHandle);
   } else {
     return super.getDocumentVersion(documentHandle);
   }
 }
 public String getNodeValue(int nodeHandle) {
   if (_dom != null) {
     return _dom.getNodeValue(nodeHandle);
   } else {
     return super.getNodeValue(nodeHandle);
   }
 }
 public String getDocumentTypeDeclarationPublicIdentifier() {
   if (_dom != null) {
     return _dom.getDocumentTypeDeclarationPublicIdentifier();
   } else {
     return super.getDocumentTypeDeclarationPublicIdentifier();
   }
 }
 public short getNodeType(int nodeHandle) {
   if (_dom != null) {
     return _dom.getNodeType(nodeHandle);
   } else {
     return super.getNodeType(nodeHandle);
   }
 }
 public boolean supportsPreStripping() {
   if (_dom != null) {
     return _dom.supportsPreStripping();
   } else {
     return super.supportsPreStripping();
   }
 }
 public short getLevel(int nodeHandle) {
   if (_dom != null) {
     return _dom.getLevel(nodeHandle);
   } else {
     return super.getLevel(nodeHandle);
   }
 }
 public boolean isCharacterElementContentWhitespace(int nodeHandle) {
   if (_dom != null) {
     return _dom.isCharacterElementContentWhitespace(nodeHandle);
   } else {
     return super.isCharacterElementContentWhitespace(nodeHandle);
   }
 }
 public boolean isSupported(String feature, String version) {
   if (_dom != null) {
     return _dom.isSupported(feature, version);
   } else {
     return super.isSupported(feature, version);
   }
 }
 public boolean isAttributeSpecified(int attributeHandle) {
   if (_dom != null) {
     return _dom.isAttributeSpecified(attributeHandle);
   } else {
     return super.isAttributeSpecified(attributeHandle);
   }
 }
 public String getDocumentBaseURI() {
   if (_dom != null) {
     return _dom.getDocumentBaseURI();
   } else {
     return super.getDocumentBaseURI();
   }
 }
 public boolean needsTwoThreads() {
   if (_dom != null) {
     return _dom.needsTwoThreads();
   } else {
     return super.needsTwoThreads();
   }
 }
 public void setDocumentBaseURI(String baseURI) {
   if (_dom != null) {
     _dom.setDocumentBaseURI(baseURI);
   } else {
     super.setDocumentBaseURI(baseURI);
   }
 }