XML Script logo
The depth function
Code
<_data >
<bar >
   <foo >
      <wibble >
         <tree >
            <frog name="fred" />
            <toad />
         </tree>
      </wibble>
   </foo>
</bar>
</_data>

# depth(\**\frog{.name == "fred"}) #
# \**\frog{.name == "fred"}.__path #
Output

11
\TopicList[1]\File[85]\Topic[1]\Example[1]\Code[1]\_data[1]\bar[1]\foo[1]\wibble[1]\tree[1]\frog[1]
Ref

x.8801

XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs

X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited
© Copyright 1998-2000 DecisionSoft Limited