Using recursive section

J

jp

Hi

How could I go through all recursive nodes from bottom section to up first
section by using Jscript?

Example of Data Structure:
Chapter1 (recursive section)
Chapter1.1
Chapter1.1.2
- How could I read upper (parent) sections nodes in this node by
using Jscript?
Information of Chapter1.2 is not needed.
Chapter1.2

Best Regards
Juha
 
B

Bart

Chapter1 (recursive section)
Chapter1.1
Chapter1.1.2
- How could I read upper (parent) sections nodes in this node by
using Jscript?
Information of Chapter1.2 is not needed.
Chapter1.2

use the selectsinglenode function in MSXML dom
and paste the followingin the (--)
path="/Chapter1/Chapter1.1/Chapter1.1.2/.."
 
J

jp

Hi

The problem with this is that I don't know how deep is the hierachy, so the
chapter level
might be for example 1.1.1.2.1 and I need to go though all upper chapters by
using javascript.

Syntac which maight work could be something like

for (currentnodelevel; currentnodelevel>1; currentnodelevel-1) {
ChapterText=selectsinglenode("currentnodelevel")
...
}

But how to get currentnodelevel of recursive section or is the some
parentnode functions which I could use?

Regards
Juha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top