xjpmauricio
asked on
XML remove element problem ( RemoveChild ? )
Hi, i have a XML File like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<emailsListToRemove>
<email>aaa@zzz.pt</email>
<email>bbb@netcabo.pt</ema il>
<email>bbb@netcabo.pt</ema il>
<email>ccc@hotmail.com</em ail>
<email>aaa@zzz.pt</email>
<email>aaa@zzz.pt</email>
<email>aaa@zzz.pt</email>
<email>aaa@zzz.pt</email>
<email>ccc@netcabo.pt</ema il>
</emailsListToRemove>
...and i want to remove all emails = aaa@zzz.pt and the result i want to
achieve is something like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<emailsListToRemove>
<email>bbb@netcabo.pt</ema il>
<email>bbb@netcabo.pt</ema il>
<email>ccc@hotmail.com</em ail>
<email>ccc@netcabo.pt</ema il>
</emailsListToRemove>
...all the <email>aaa@zzz.pt</email> elements removed.
thanks
<?xml version="1.0" encoding="iso-8859-1"?>
<emailsListToRemove>
<email>aaa@zzz.pt</email>
<email>bbb@netcabo.pt</ema
<email>bbb@netcabo.pt</ema
<email>ccc@hotmail.com</em
<email>aaa@zzz.pt</email>
<email>aaa@zzz.pt</email>
<email>aaa@zzz.pt</email>
<email>aaa@zzz.pt</email>
<email>ccc@netcabo.pt</ema
</emailsListToRemove>
...and i want to remove all emails = aaa@zzz.pt and the result i want to
achieve is something like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<emailsListToRemove>
<email>bbb@netcabo.pt</ema
<email>bbb@netcabo.pt</ema
<email>ccc@hotmail.com</em
<email>ccc@netcabo.pt</ema
</emailsListToRemove>
...all the <email>aaa@zzz.pt</email> elements removed.
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.