cancel
Showing results for 
Search instead for 
Did you mean: 

WDCOPYSERVICE

Former Member
0 Kudos

I want to copy one node element to another.

the scenario is am displaying material data and in that i want to change the material details and save it. for this how can i implement copycorresponding method of wdcopyservice

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

Use the following pointer code to do that:

WdCopyService.copyCorresponding(sourceNode,targetNode);

Bala

Former Member
0 Kudos

Hi Renu,

If you are using

public static void copyCorresponding(java.lang.Object source, java.lang.Object target)

in WDCopySertvice both the source and target should be node elements having the same structure.

If the basic types of the attributes are not compatible the values are discarded

Get the element of the source node

IPrivate<view name>.I<node name>Element ele = wdcontext.node<node name>.get<node name>ElementAt(index);

Get the value of attribute make the changes and set the value accordingly

create an element of second node

IPrivate<view name>.I<node name>Element ele = wdcontext.node<node name>.create<node name>Element()

then use copyCorresponding()

hope this helps you

Regards

Rohit

Message was edited by: Rohit Radhakrishnan