21 Feb
2011
21 Feb
'11
8:11 p.m.
Hi all, this must be easy, but I don't find the solution. Given an xml structure like this: <X> <A>dog</A> <A><B>cat</B></A> <A><B>mouse</B></A> </X> which \xmlfilter expression do I need to get the first <A> element which has a subelement <B>? I.e., the filter should only return "cat," not "dog" or "mouse." There can be 0 or more elements without <B> before and after the one I want to retrieve. Sorry if this is elementary, but I looked at xml-mkiv.pdf and mk.pdf and couldn't find an answer. Thanks Thomas