tags:

views:

260

answers:

1

hello friends,

<login>
  <user>
     <userid>admin</userid>
  </user>
  .
  .
  .
  .
  <user>
    <userid>admin</userid>
  </user>
</login>

this my xml file. when i user clear()or del method it will clear all the child and a blank node is creating

<user/>

How can i avoid creating this blank node

it will make problem when i use findall() and try to access any of its child

can anyone provide me a piece of code to del the node fully???

+3  A: 

Removing match user node from parent Node would be suitable for this case.

S.Mark