summaryrefslogtreecommitdiffstats
path: root/src/xml/simple-node.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-01-16 16:18:45 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-01-16 16:18:45 +0000
commit03cb69220632b0c674efff5be3aab8be35d23eff (patch)
tree464a1f74c57b796604ceb38c1687d579d2891800 /src/xml/simple-node.cpp
parentupdate to trunk (diff)
parentTest implementation of 'shape-padding'. (diff)
downloadinkscape-03cb69220632b0c674efff5be3aab8be35d23eff.tar.gz
inkscape-03cb69220632b0c674efff5be3aab8be35d23eff.zip
update to trunk
(bzr r13708.1.7)
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()) {