aboutsummaryrefslogtreecommitdiff
path: root/src/support/dom
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/dom')
-rw-r--r--src/support/dom/result_node_facade.cc11
-rw-r--r--src/support/dom/result_node_facade.h4
2 files changed, 15 insertions, 0 deletions
diff --git a/src/support/dom/result_node_facade.cc b/src/support/dom/result_node_facade.cc
index 597448b..eeb2cc6 100644
--- a/src/support/dom/result_node_facade.cc
+++ b/src/support/dom/result_node_facade.cc
@@ -1,6 +1,7 @@
#include "result_node_facade.h"
#include <xercesc/dom/DOMText.hpp>
+#include <xercesc/dom/DOMNodeList.hpp>
#include "support/xerces_string_guard.h"
@@ -21,6 +22,10 @@ ResultNodeFacade::~ResultNodeFacade() {
this->root_node_->appendChild(this->result_node_);
}
+xercesc::DOMNode* ResultNodeFacade::getNode() {
+ return this->result_node_;
+}
+
void ResultNodeFacade::setAttribute(
const std::string& name,
const std::string& value
@@ -58,4 +63,10 @@ void ResultNodeFacade::setContent(xercesc::DOMNode* node) {
this->result_node_->appendChild(node);
}
+void ResultNodeFacade::setContent(xercesc::DOMNodeList* nodes) {
+ for ( std::size_t index = 0; index != nodes->getLength(); ++index ) {
+ this->setContent(nodes->item(index));
+ }
+}
+
}
diff --git a/src/support/dom/result_node_facade.h b/src/support/dom/result_node_facade.h
index ccdd850..bf73582 100644
--- a/src/support/dom/result_node_facade.h
+++ b/src/support/dom/result_node_facade.h
@@ -18,10 +18,14 @@ class ResultNodeFacade {
);
~ResultNodeFacade();
+ xercesc::DOMNode* getNode();
+
void setAttribute(const std::string&, const std::string&);
void setValueNode(const std::string&, const std::string&);
+
void setContent(const std::string&);
void setContent(xercesc::DOMNode*);
+ void setContent(xercesc::DOMNodeList*);
private:
xercesc::DOMDocument* const dom_document_;