summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cxml.cc7
-rw-r--r--src/cxml.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/cxml.cc b/src/cxml.cc
index b065b37..7096f71 100644
--- a/src/cxml.cc
+++ b/src/cxml.cc
@@ -248,6 +248,13 @@ cxml::Node::namespace_prefix () const
return _node->get_namespace_prefix ();
}
+
+bool
+cxml::Node::is_text() const
+{
+ return dynamic_cast<const xmlpp::TextNode*>(_node);
+}
+
cxml::Document::Document (string root_name)
: _root_name (root_name)
{
diff --git a/src/cxml.h b/src/cxml.h
index 9a71889..713e9af 100644
--- a/src/cxml.h
+++ b/src/cxml.h
@@ -231,6 +231,8 @@ public:
return _node;
}
+ bool is_text() const;
+
protected:
xmlpp::Node* _node;