Remove an Element in XML

by satheesh 2010-01-30 10:23:50

The removeChild() method removes a specified node (or element).

The following code fragment will remove the first node in the first <book> element:

Example
*******

x=xmlDoc.getElementsByTagName("book")[0];

x.removeChild(x.childNodes[0]);

Tagged in:

846
like
0
dislike
0
mail
flag

You must LOGIN to add comments