on 01-03-2006 10:32 AM
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
Hello,
Use the following pointer code to do that:
WdCopyService.copyCorresponding(sourceNode,targetNode);
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.