Here is an example of my xml code and I'll tell you my problem<root><Document name="A" title="A" ><Document name="B" title="B" ><Document name="C" title="C" ><Section title="1" position="" >Section ABDFD</Section></Document></Document></Document></root>Normally, I have a recursive function but for the sake of simplicity here, I transfered it in two loops imbricated.when I do this code, I don't want, if I'm in document A, my sections in document C to be listed as children of document A.foreach (->find('Root')->children('Document') as $element) {echo $element->attr('title'); // echoes me Aforeach($element->children('Section') as $sectionElement) {echo $sectionElement->attr('title'); //it is echoing 1, I think since it echoed A before, it shouldn't even get into this loop since A doesn't have any immediate children as Sections}}Am I doing something wrong of is it a bug ?Thank you--
You received this message because you are subscribed to the Google Groups "support-querypath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to support-queryp...@googlegroups.com.
To post to this group, send email to support-...@googlegroups.com.
Visit this group at http://groups.google.com/group/support-querypath?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.