protected org.w3c.dom.Node getAdapter()
    {
        if (adapter == null)
        {
            switch (this.type)
            {
                case RootNode:
                    adapter = new DOMDocumentImpl(this);
                    break;
                case StartTag:
                case StartEndTag:
                    adapter = new DOMElementImpl(this);
                    break;
                case DocTypeTag:
                    adapter = new DOMDocumentTypeImpl(this);
                    break;
                case CommentTag:
                    adapter = new DOMCommentImpl(this);
                    break;
                case TextNode:
                    adapter = new DOMTextImpl(this);
                    break;
                case CDATATag:
                    adapter = new DOMCDATASectionImpl(this);
                    break;
                case ProcInsTag:
                    adapter = new DOMProcessingInstructionImpl(this);
                    break;
                default:
                    adapter = new DOMNodeImpl(this);
            }
        }
        return adapter;
    }