diff options
author | crupest <crupest@outlook.com> | 2022-01-27 20:07:15 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-01-27 20:07:15 +0800 |
commit | 56633dab8c1bf9d25a6367a651b5b054055a2130 (patch) | |
tree | d372843e3f6f91604a077ed15c353bedd5ef7e1b /include/cru/xml | |
parent | d3aa43d9ea0dfc32935767cf60a89af2736dc339 (diff) | |
download | cru-56633dab8c1bf9d25a6367a651b5b054055a2130.tar.gz cru-56633dab8c1bf9d25a6367a651b5b054055a2130.tar.bz2 cru-56633dab8c1bf9d25a6367a651b5b054055a2130.zip |
...
Diffstat (limited to 'include/cru/xml')
-rw-r--r-- | include/cru/xml/XmlNode.hpp | 3 |
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; |