Annotation of parser3/src/types/pa_vxdoc.C, revision 1.20
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: */
7: #include "pa_config_includes.h"
8: #ifdef XML
1.14 paf 9:
1.20 ! paf 10: static const char* IDENT_VXDOC="$Date: 2002/08/15 07:53:07 $";
1.1 parser 11:
12: #include "pa_vxdoc.h"
13:
1.7 paf 14: void VXdoc_destructor(void *vxdoc) {
1.1 parser 15: //_asm int 3;
1.7 paf 16: static_cast<VXdoc *>(vxdoc)->~VXdoc();
1.1 parser 17: }
1.2 parser 18:
1.19 paf 19: Value *VXdoc::as(const char *atype, bool looking_up) {
20: if(Value *result=Value::as(atype, looking_up))
21: return result;
1.18 paf 22: else
1.19 paf 23: return VXnode::as(atype, looking_up);
1.18 paf 24: }
25:
1.2 parser 26: /// VXdoc: $CLASS,$method
1.18 paf 27: Value *VXdoc::get_element(const String& aname, Value *aself, bool looking_up) {
1.13 paf 28: // up
1.18 paf 29: if(Value *result=VXnode::get_element(aname, aself, looking_up))
1.8 paf 30: return result;
31:
32: // fields
1.16 paf 33: GdomeDocument *document=get_document(&aname);
1.8 paf 34: GdomeException exc;
35:
1.16 paf 36: if(aname=="doctype") {
1.8 paf 37: // readonly attribute DocumentType doctype;
1.9 paf 38: return NEW VXnode(pool(), (GdomeNode *)gdome_doc_doctype(document, &exc));
1.16 paf 39: } else if(aname=="implementation") {
1.8 paf 40: // readonly attribute DOMImplementation implementation;
41: return 0;
1.16 paf 42: } else if(aname=="documentElement") {
1.8 paf 43: // readonly attribute Element documentElement;
1.9 paf 44: return NEW VXnode(pool(), (GdomeNode *)gdome_doc_documentElement(document, &exc));
1.8 paf 45: }
1.2 parser 46:
1.20 ! paf 47: bark("%s field not found", 0, &aname); return 0;
1.2 parser 48: }
49:
1.1 parser 50: #endif
E-mail: