in reply to Re^2: Twig delete not deleting the entire section?
in thread Twig delete not deleting the entire section?
When the handler triggers on name only
<site siteid="TWO"> <name>name2</name>
has been parsed so name is the only child the parent has.
Add a $cnt->parent->print statement to see it. If you change the order of elements your original code works.
<sites> <site siteid="ONE"> <name>name1</name> <address>address1</address> <contact>contact1</contact> </site> <site siteid="TWO"> <address>address2</address> <contact>contact2</contact> <name>name2</name> </site> </sites>
If the handler is on site like choroba said, that is triggered after all the children have been parsed.
poj
|
|---|