aboutsummaryrefslogtreecommitdiff
path: root/include/cru/xml
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/xml')
-rw-r--r--include/cru/xml/XmlNode.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/cru/xml/XmlNode.hpp b/include/cru/xml/XmlNode.hpp
index f308c9de..d1cb9430 100644
--- a/include/cru/xml/XmlNode.hpp
+++ b/include/cru/xml/XmlNode.hpp
@@ -33,6 +33,9 @@ class CRU_XML_API XmlNode {
virtual XmlNode* Clone() const = 0;
+ bool IsTextNode() const { return type_ == Type::Text; }
+ bool IsElementNode() const { return type_ == Type::Element; }
+
XmlElementNode* AsElement();
XmlTextNode* AsText();
const XmlElementNode* AsElement() const;