File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -6811,17 +6811,28 @@ namespace pugi
68116811 cur = cur->first_child ;
68126812 }
68136813 else if (cur->next_sibling )
6814+ {
68146815 cur = cur->next_sibling ;
6816+ walker.out (arg_for_each);
6817+ }
68156818 else
68166819 {
68176820 while (!cur->next_sibling && cur != _root && cur->parent )
68186821 {
6822+ xml_node arg_out (cur);
6823+
68196824 --walker._depth ;
68206825 cur = cur->parent ;
6826+
6827+ walker.out (arg_out);
68216828 }
68226829
68236830 if (cur != _root)
6831+ {
6832+ xml_node arg_out (cur);
68246833 cur = cur->next_sibling ;
6834+ walker.out (arg_out);
6835+ }
68256836 }
68266837 }
68276838 while (cur && cur != _root);
Original file line number Diff line number Diff line change @@ -1048,6 +1048,8 @@ namespace pugi
10481048
10491049 // Callback that is called for each node traversed
10501050 virtual bool for_each (xml_node& node) = 0;
1051+ // Callback that is called after each node traversed
1052+ virtual void out (const xml_node& ){}
10511053
10521054 // Callback that is called when traversal ends
10531055 virtual bool end (xml_node& node);
You can’t perform that action at this time.
0 commit comments