Annotation of parser3/src/types/pa_vxdoc.C, revision 1.12

1.1       parser      1: /** @dom
                      2:        Parser: @b dom parser type.
                      3: 
1.12    ! paf         4:        Copyright(c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com)
1.11      paf         5:        Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.1       parser      6: 
1.12    ! paf         7:        $Id: pa_vxdoc.C,v 1.11 2002/02/08 08:31:33 paf Exp $
1.1       parser      8: */
                      9: #include "pa_config_includes.h"
                     10: #ifdef XML
1.12    ! paf        11: static const char *RCSId="$Id: pa_vxdoc.C,v 1.11 2002/02/08 08:31:33 paf Exp $"; 
1.1       parser     12: 
                     13: #include "pa_vxdoc.h"
                     14: 
1.7       paf        15: void VXdoc_destructor(void *vxdoc) {
1.1       parser     16:        //_asm int 3;
1.7       paf        17:        static_cast<VXdoc *>(vxdoc)->~VXdoc();
1.1       parser     18: }
1.2       parser     19: 
                     20: /// VXdoc: $CLASS,$method
                     21: Value *VXdoc::get_element(const String& name) { 
1.8       paf        22:        // $CLASS,$method
                     23:        if(Value *result=VStateless_object::get_element(name))
                     24:                return result;
                     25: 
                     26:        // fields
1.9       paf        27:        GdomeDocument *document=get_document(&name);
1.8       paf        28:        GdomeException exc;
                     29: 
                     30:        if(name=="doctype") {
                     31:                // readonly attribute DocumentType doctype;
1.9       paf        32:                return NEW VXnode(pool(), (GdomeNode *)gdome_doc_doctype(document, &exc));
1.8       paf        33:        } else if(name=="implementation") {
                     34:                // readonly attribute DOMImplementation implementation;
                     35:                return 0;
                     36:        } else if(name=="documentElement") {
                     37:                // readonly attribute Element documentElement;
1.9       paf        38:                return NEW VXnode(pool(), (GdomeNode *)gdome_doc_documentElement(document, &exc));
1.8       paf        39:        }       
1.2       parser     40: 
                     41:        return 0;
                     42: }
                     43: 
1.1       parser     44: #endif

E-mail: