Selecting all elements, nested or not

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MarkoKlacar
    Recognized Expert Contributor
    • Aug 2007
    • 296

    #1

    Selecting all elements, nested or not

    Hi,

    I have a problem. I have a tag that can occur like this:

    [HTML]<top><inside> 1</inside></top>[/HTML]

    or like this:

    [HTML]<top><insideTop ><inside>1</inside></insideTop></top>[/HTML]
    [HTML]<top><insideTop ><insideTop2><i nside>1</inside></insideTop2></insideTop></top>[/HTML]

    Now what I would like to do is select the <inside> tag no matter how "deep" it occurs.

    Is there a way to do this?

    Tanks.
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    Assuming you're still talking about xslt, and the top node is the current context, the xpath could be:
    //inside
    or
    descendant::ins ide

    Comment

    • MarkoKlacar
      Recognized Expert Contributor
      • Aug 2007
      • 296

      #3
      Thanks, I'll try that.

      Cheers

      Comment

      Working...