summaryrefslogtreecommitdiff
path: root/project2/xmlScriptParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project2/xmlScriptParser.cpp')
-rw-r--r--project2/xmlScriptParser.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/project2/xmlScriptParser.cpp b/project2/xmlScriptParser.cpp
index 8db4049..fad9542 100644
--- a/project2/xmlScriptParser.cpp
+++ b/project2/xmlScriptParser.cpp
@@ -3,13 +3,15 @@
#include <boost/filesystem/convenience.hpp>
XmlScriptParser::XmlScriptParser(const std::string & group, const std::string & name, bool ii) :
- IsInclusion(ii)
+ IsInclusion(ii),
+ loader(true)
{
loadDocument(group + "/" + name + ".xml");
}
XmlScriptParser::XmlScriptParser(const std::string & file, bool ii) :
- IsInclusion(ii)
+ IsInclusion(ii),
+ loader(true)
{
loadDocument(file);
}
@@ -17,6 +19,7 @@ XmlScriptParser::XmlScriptParser(const std::string & file, bool ii) :
void
XmlScriptParser::loadDocument(const std::string & file)
{
+ loader.supportedStorers.insert(Storer::into(&rowSets));
if (!boost::filesystem::exists(file)) {
if (IsInclusion) {
throw DependencyNotFound(file);
@@ -38,3 +41,9 @@ XmlScriptParser::loadDocument(const std::string & file)
}
}
+void
+XmlScriptParser::parseDocument()
+{
+ loader.collectAll(this, get_document()->get_root_node(), true, ErrorOnUnsupported);
+}
+