Skip to Content
0
Former Member
Mar 25, 2009 at 12:23 PM

dump at if condition statement. Null pointer Exception

51 Views

hi all,

I have a recursive node as a child node for a value node. I have created an instance of the value node.

I also have accessed current elem of this value node. Since every elem of this value node will have recursive node also in it, I want to access the recursive node present in the elem.

I want to do this using general node and element API - ie IWDNode and IWDNodeElement.

No specific node name can be used coz this is done for a generic method which takes a value node a as parameter and tries to create child elems for the node accessing the recursive node present in it.

How can this be done ?

I am using the following code.

String ChildName = SourceNode.getNodeInfo().getName().split("_")[1] + "Rec";

IWDNode childNode = SourceNode.getChildNode(ChildName, 0);

if (childNode == null || childNode.size() == 0 ) {

It throws a dump at if condition statement. ( Null pointer Exception)

Any help appreciated !!

Edited by: ymb on Mar 25, 2009 1:23 PM