View Single Post
  #1 (permalink)  
Old April 20th, 2008, 01:04 PM
aliov_85 aliov_85 is offline
Registered User
 
Join Date: Apr 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to detect the level of an element

HI

I would like to detect the level of an element in according to his root.
Quote:
quote:
  <Issue issueID="" composer="" date="">
    <Proposition composer="" date="" level="1" actname="proposition">
      <Agreement composer="" date="" level="2"></Agreement>
    </Proposition>
  </Issue>
Suppose that I want to output all elements nested just in the "Issue" element and not in it's sub element and I also don't know their name(Proposition is an example and I have to be able to output even if it changes).

How can I output an element considering the only information I have that element is it's level(from the root), by the way of an attribute("level").

Thanks in advance

Ali

Reply With Quote