I'm trying to select only the a elements that have a child with a c attribute. So in this case it would be only the first two a elements.
<alpha>
<a id="1">
<b c="1"/>
</a>
<a id="2">
<b c="1"/>
</a>
<a id="3">
<b />
</a>
</alpha>
Any thoughts on how to do this? I've tried the following with no luck:
/alpha/a/b/*[@c]
//a[b/*[@c]]
Thanks in advance for any help!
edit: It was suggested that I consult the solutions posed to this question, however, the problem addressed in that thread is different than mine (involving child elements rather than attributes of child elements) and I haven't been able to extrapolate a solution to my problem from this.