From 56633dab8c1bf9d25a6367a651b5b054055a2130 Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 27 Jan 2022 20:07:15 +0800 Subject: ... --- include/cru/xml/XmlNode.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/cru/xml/XmlNode.hpp') 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; -- cgit v1.2.3