title: TCL tdom xml parsing backward until root
body: <p>I have a one tcl proc to write where I have given one randon node of a xml. I have to parse its parents whether they have a particular attribute field is set or not.In C++ I can easily do this using recursive function which breaks when ROOT node is reached. But in tdom I can not find how to check whether Root node has been reached or not.</p>
  
  <pre><code>/##I am just doing a rough in the following code. I wanted something like it ##
  proc testRecursive {XMLnode } {
      if { $XMLnode !=ROOTNODE} { 
          set ParentND [$XMLnode parentNode]
          /#some checkings and other actions done here
          testRecursive ParentND
      } else {
          exit             
      }
  }
  </code></pre>
  
  <p>I am new to tcl ,so syntaxs are not good, just wanted to convey the idea. How to get this result . please help.</p>