cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get the Attribute - Names of a Node

Former Member
0 Kudos

Hello experts,

I am trying to get the Attribute names of a Node.

I have done following:

Iterator iterator = wdContext.node<Node>.getNodeInfo().iterateAttributes();

while(iterator.hasNext()){

String attrName = iterator.next().toString();

}

But the problem is that I get the hole path of the node like

--> MappedAttributeInfo(<View>.<Node>.<AttributeName>)

But I need just the Attribute as String. Any Ideas???

Regards

Marco

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Refer the following thread

https://www.sdn.sap.com/irj/scn/thread?messageID=6302316#6302316

just i am explaining the code you found in the above thread


IWDNodeElement element=wdContext.current<Node Name>Element();
	for (Iterator it = element.node().getNodeInfo().iterateAttributes(); it.hasNext(); )
	{
	  IWDAttributeInfo attr = (IWDAttributeInfo) it.next();
	  String attrName = attr.getName();
	 // use the attrName to get the attribute name
	}

Regards,

ramesh

Former Member
0 Kudos

A really impressive addition to my code

Armin

Answers (0)