thriputapriya
09-21-2004, 03:29 AM
Hi Antun,
I have a problem in below code,in this,i want delete all the nodes of the myds dataset.Any suggestions?<canvas debug="true">
<dataset name="myds">
<myroot>
<myfirstchild />
<myfirstchild />
<myfirstchild />
<myfirstchild />
<myfirstchild />
</myroot>
<myroot>
<myfirstchild />
<myfirstchild />
<myfirstchild />
<myfirstchild />
<myfirstchild />
</myroot>
<myroot>
<myfirstchild />
<myfirstchild />
<myfirstchild />
<myfirstchild />
<myfirstchild />
</myroot>
</dataset>
<button>
<method event="onclick">
var dp = myds.getPointer();
dp.setXPath( 'myds:/myroot[1]' );
debug.write( '= before ==============================' );
var s = dp.serialize();
debug.write( s );
dp.deleteNode();
s = dp.serialize();
debug.write( '= after ==============================' );
debug.write( s );
</method>
</button>
</canvas>
Thanks
-T
I have a problem in below code,in this,i want delete all the nodes of the myds dataset.Any suggestions?<canvas debug="true">
<dataset name="myds">
<myroot>
<myfirstchild />
<myfirstchild />
<myfirstchild />
<myfirstchild />
<myfirstchild />
</myroot>
<myroot>
<myfirstchild />
<myfirstchild />
<myfirstchild />
<myfirstchild />
<myfirstchild />
</myroot>
<myroot>
<myfirstchild />
<myfirstchild />
<myfirstchild />
<myfirstchild />
<myfirstchild />
</myroot>
</dataset>
<button>
<method event="onclick">
var dp = myds.getPointer();
dp.setXPath( 'myds:/myroot[1]' );
debug.write( '= before ==============================' );
var s = dp.serialize();
debug.write( s );
dp.deleteNode();
s = dp.serialize();
debug.write( '= after ==============================' );
debug.write( s );
</method>
</button>
</canvas>
Thanks
-T