summaryrefslogtreecommitdiffstats
path: root/src/xml/simple-node.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-03-18 18:07:14 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-03-18 18:07:14 +0000
commite77956b4dbd029c9f6949f81fe083606f995c624 (patch)
tree74adda4df8986d65f70efb341c6235277361fd35 /src/xml/simple-node.cpp
parentupdated code to work on 0.92 code (diff)
parentLatvian translation update (diff)
downloadinkscape-e77956b4dbd029c9f6949f81fe083606f995c624.tar.gz
inkscape-e77956b4dbd029c9f6949f81fe083606f995c624.zip
update to trunk
(bzr r12588.1.39)
Diffstat (limited to 'src/xml/simple-node.cpp')
-rw-r--r--src/xml/simple-node.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/xml/simple-node.cpp b/src/xml/simple-node.cpp
index 4965f81c8..3cbedc80b 100644
--- a/src/xml/simple-node.cpp
+++ b/src/xml/simple-node.cpp
@@ -606,6 +606,26 @@ void SimpleNode::synthesizeEvents(NodeObserver &observer) {
synthesizeEvents(&OBSERVER_EVENT_VECTOR, &observer);
}
+void SimpleNode::recursivePrintTree(unsigned level) {
+
+ if (level == 0) {
+ std::cout << "XML Node Tree" << std::endl;
+ }
+ std::cout << "XML: ";
+ for (unsigned i = 0; i < level; ++i) {
+ std::cout << " ";
+ }
+ char const *id=attribute("id");
+ if (id) {
+ std::cout << id << std::endl;
+ } else {
+ std::cout << name() << std::endl;
+ }
+ for (SimpleNode *child = _first_child; child != NULL; child = child->_next) {
+ child->recursivePrintTree( level+1 );
+ }
+}
+
Node *SimpleNode::root() {
Node *parent=this;
while (parent->parent()) {