Link to home
Start Free TrialLog in
Avatar of xjpmauricio
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</email>
  <email>bbb@netcabo.pt</email>
  <email>ccc@hotmail.com</email>
  <email>aaa@zzz.pt</email>
  <email>aaa@zzz.pt</email>
  <email>aaa@zzz.pt</email>
  <email>aaa@zzz.pt</email>
  <email>ccc@netcabo.pt</email>
</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</email>
  <email>bbb@netcabo.pt</email>
  <email>ccc@hotmail.com</email>
  <email>ccc@netcabo.pt</email>
</emailsListToRemove>

...all the   <email>aaa@zzz.pt</email> elements removed.

thanks
ASKER CERTIFIED SOLUTION
Avatar of pallosp
pallosp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial