--- parser3/src/classes/xnode.C 2002/04/18 15:54:39 1.45 +++ parser3/src/classes/xnode.C 2002/08/15 09:07:49 1.48 @@ -3,12 +3,12 @@ Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - - $Id: xnode.C,v 1.45 2002/04/18 15:54:39 paf Exp $ */ #include "classes.h" #ifdef XML +static const char* IDENT_XNODE_C="$Date: 2002/08/15 09:07:49 $"; + #include "pa_charset.h" #include "pa_request.h" #include "pa_vxnode.h" @@ -97,14 +97,12 @@ private: GdomeNode *as_node(const String& method_name, MethodParams *params, int index, const char *msg) { Value& value=params->as_no_junction(index, msg); - if(!(strcmp(value.type(), VXNODE_TYPE)==0 - || strcmp(value.type(), VXDOC_TYPE)==0)) + if(Value *vxnode=value.as(VXNODE_TYPE, false)) + return static_cast(vxnode)->get_node(&method_name); + else throw Exception("parser.runtime", &method_name, msg); - - VXnode& vnode=*static_cast(&value); - return vnode.get_node(&method_name); } // helpers