cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine valu attributes for in value node at runtime

Former Member
0 Kudos

Hi Experts

I have one value node in my application with only value attributes(no sub nodes). At runtime I want to determine , how many value attributes it has. Is there any method exsist for this?

Thanks in Advance

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

how about just this?

wdContext.nodeNodeName.size();

Regards,

faB

Former Member
0 Kudos

No, this gives you the size of the node collection i.e. the number of node elements stored in the node.

The original poster wanted to get the number of attributes which are metadata.

Armin

Former Member
0 Kudos

IWDNode node = wdContext.nodeSearchoutput();

Iterator i = node.getNodeInfo().iterateAttributes();

int count = 0;

while(i.hasNext()){

wdComponentAPI.getMessageManager().reportWarning("Attribute : "+i.next().toString());

count++;

}

count will give u the no of value attributes inside that node..

(iterate children is to iterate thru child nodes...)

Regards

Bharathwaj

Former Member
0 Kudos

Try using

wdContext.node<Nodename>().getNodeInfo().iterateAttributes()

Former Member
0 Kudos

Hi,

Try this

IWDNode n=wdThis.wdGetContext().getChildNode("NodeName",0);

n.size();

OR

Iterator it=n.getNodeInfo().iterateChildren();

while(it.hasNext())

{

IWDNodeInfo nodeinfo=(IWDNodeInfo)it.next();

nodeinfo.getName();

}

Regards, Anilkumar

Message was edited by: Anilkumar Vippagunta