I have a tree like this:
<feed>
<entry>
<apps:property name="includes" value="john@example.com"/>
<apps:property name="excludes" value="mike@example.com"/>
</entry>
<entry>
<apps:property name="includes" value="john@example.com"/>
<apps:property name="excludes" value="john@example.com"/>
</entry>
</feed>
I'd like to delete all <apps:property name="excludes">
in entries where there is the same value in "includes" and "excludes".
I.e. in this case, I want to delete the second <apps:property>
in the second <entry>
.
How do I do it using Nokogiri? I am a newbie at XML and I cannot find the correct methods in the Nokogiri docs.