--- parser3/src/classes/xdoc.C 2003/09/22 09:02:24 1.113 +++ parser3/src/classes/xdoc.C 2003/11/06 08:22:48 1.115 @@ -9,7 +9,7 @@ #ifdef XML -static const char* IDENT_XDOC_C="$Date: 2003/09/22 09:02:24 $"; +static const char* IDENT_XDOC_C="$Date: 2003/11/06 08:22:48 $"; #include "gdome.h" #include "libxml/tree.h" @@ -26,6 +26,7 @@ static const char* IDENT_XDOC_C="$Date: #include "pa_vxdoc.h" #include "pa_charset.h" #include "pa_vfile.h" +#include "pa_xml_exception.h" #include "xnode.h" // defines @@ -160,7 +161,7 @@ private: static void writeNode(Request& r, GdomeNode *node, GdomeException exc) { if(!node || exc) - throw Exception(0, exc); + throw XmlException(0, exc); // write out result r.write_no_lang(*new VXnode(&r.charsets, node)); @@ -328,7 +329,7 @@ static void _getElementsByTagName(Reques gulong length=gdome_nl_length(nodes, &exc); for(gulong i=0; ias_string(); } static void param_option_over_output_option( HashStringValue& param_options, const char* option_name, bool& output_option) { - if(Value* value=param_options.get(StringBody(option_name))) { + if(Value* value=param_options.get(String::Body(option_name))) { const String& s=value->as_string(); if(s=="yes") output_option=true; @@ -561,7 +562,7 @@ static void prepare_output_options(Reque if(voptions.is_defined()) { if(HashStringValue *options=voptions.get_hash()) { // $.method[xml|html|text] - if(Value* vmethod=options->get(StringBody(XDOC_OUTPUT_METHOD_OPTION_NAME))) + if(Value* vmethod=options->get(String::Body(XDOC_OUTPUT_METHOD_OPTION_NAME))) oo.method=&vmethod->as_string(); // $.version[1.0] @@ -692,7 +693,7 @@ static void _file(Request& r, MethodPara value_name, new VString(*oo.mediaType)); vhcontent_type.hash().put( - StringBody("charset"), + String::Body("charset"), new VString(*oo.encoding)); vfile.set(false/*tainted*/, buf.str?buf.str:""/*to distinguish from stat-ed file*/, buf.length,