Subject:Traversing XML Tree - Want to get next Element Author:K J Date:08 Nov 2006 04:46 AM
Hi all,
I have some XSL that goes down the structure and when I get to a particular tag I want the variable Im declaring to hold just the next tag name. This is shown below:
<a>
<b>
<c/>
</b>
</a>
So what I want is to go down to <b> and then get the value of <c>. This could be different everytime so next time it could be <d/>.
Subject:Traversing XML Tree - Want to get next Element Author:Tony Lavinio Date:08 Nov 2006 09:15 AM
It's not really clear what you are asking for a real document.
When you say 'tag' do you mean 'element'?
It is best when thinking of XML not to think of a stream of tags,
but of the elements that comprise the start and end tags and their
content.
Assuming by 'next' you mean 'first child', for the following sample
file, this would get the name of the 'first child' of each second-level
element as the value of that element in the output.