projects
/
libcxml.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7381b19
)
Add Node::is_text().
v0.17.6
author
Carl Hetherington
<cth@carlh.net>
Fri, 22 Dec 2023 15:55:57 +0000
(16:55 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Fri, 22 Dec 2023 15:55:57 +0000
(16:55 +0100)
src/cxml.cc
patch
|
blob
|
history
src/cxml.h
patch
|
blob
|
history
diff --git
a/src/cxml.cc
b/src/cxml.cc
index b065b378dac00d9f870a30c9a8c5d945efc2f928..7096f7121ffdae0e8eaafbf62c2cdcc26baa3cf4 100644
(file)
--- 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 9a71889533e21d65932dbcdaf1c96d0fa4120da2..713e9af9263eec5523f7b347b6c9bbc5aac769a8 100644
(file)
--- a/
src/cxml.h
+++ b/
src/cxml.h
@@
-231,6
+231,8
@@
public:
return _node;
}
+ bool is_text() const;
+
protected:
xmlpp::Node* _node;