From 8faab38b589a99b316ba41960ad8ce43b4339387 Mon Sep 17 00:00:00 2001 From: randomdan Date: Fri, 25 Feb 2011 14:53:40 +0000 Subject: Build a common base for loading p2 xml scripts with proper error checking Extend cgiAppEngine to be able to return data documents specifying an error (requires Apache 2.2.16 and to have filter-errordocs set) Allow cgi requests to return a default document, suitable for 'yes, I did that' type responses Updates to GentooBrowse to use these features --- project2/commonObjects.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'project2/commonObjects.cpp') diff --git a/project2/commonObjects.cpp b/project2/commonObjects.cpp index fcf479c..b6a3b7d 100644 --- a/project2/commonObjects.cpp +++ b/project2/commonObjects.cpp @@ -1,7 +1,6 @@ #include "commonObjects.h" #include "xmlObjectLoader.h" -#include -#include +#include "xmlScriptParser.h" CommonObjects::~CommonObjects() { @@ -22,8 +21,7 @@ CommonObjects::getSource(const std::string & name) const CommonObjects::DataSources::index::type::const_iterator CommonObjects::loadDataSource(const std::string & name) const { - xmlpp::DomParser xml("datasources/" + name + ".xml"); - while (xmlXIncludeProcessFlags(xml.get_document()->cobj(), XML_PARSE_NOXINCNODE) > 0); + XmlScriptParser xml("datasources", name, true); LoaderBase loader("http://project2.randomdan.homeip.net", true); loader.supportedStorers.insert(Storer::into(&datasources)); -- cgit v1.2.3