cancel
Showing results for 
Search instead for 
Did you mean: 

Search for a node

Former Member
0 Kudos

Hi all,

I have a dynamically created context structure like this:


+Context
  +Request
    +Subdata

How can I refrence the node subdata knowing only its name?

I presume that there will be a way to search for the node and then applying getPathDescription() I can refer to it but any other suggestion is appreciated.

thanks in advance,

Stefano

Accepted Solutions (1)

Accepted Solutions (1)

monalisa_biswal
Contributor
0 Kudos

you can use IWDNode getChildNode(java.lang.String name,int index) method to access child node of a node.First you have to take reference of Request Node.

IWDNode <var>=wdContext.getChildNode("Request",0);

IWDNode <var1>=<var>.getChildNode("Subdata",0);

Former Member
0 Kudos

Thank you Monalisa,

the problem is that my starting point is only the name of the node and not its hierarchy.

What I mean is that if you define the context structure at design time and then you need to access a node knowing only its name you can use:


IWDNode <var>=wdContext.node<NodeName>();

even if the node is a subnode of some other node.

If you define the context structure at runtime and then you need to access a node knowing only its name how can you do that?

Former Member
0 Kudos

You can

wdContext.getChildNode() if you know the Name.

try using wdContext.iterateChildNodes();

Regards,Anilkumar

Answers (0)