HI.
This is not a complete answer but might give you, what you are looking for
The "Not a Child" will be translated into a "parent is null" whereclause part,
while the "Child" will be translated into "parent is not null".
Both can be achieved by the following QBE parameters:
QBE.NU.parent=1 ("parent is null")
QBE.NN.parent=1 ("parent is not null")
This and your usual approach might work together well.
Hope this helps a bit.
Regards
...........Michael