I want to check if there is a string which is equal to one of the attributes. For instances:
<rules>
<mother cat="pp">
<daughter cat="pr"/>
<daughter cat="np"/>
</mother>
<mother cat="wp">
<daughter cat="rp"/>
<daughter cat="vp"/>
</mother>
<mother cat="cn">
<daughter cat="jj"/>
<daughter cat="cn"/>
</mother>
<mother cat="np">
<daughter cat="jj"/>
<daughter cat="np"/>
</mother>
</rules>
I just need to test if "pp" is equal to one of the mothers' cat attribute. For this example yes it is. But it should be false for "pr".
Thank You.