Implements the option to merge tree nodes instead of replacing them. If we try to add a node with the same name than an existing one and the parameter is set to false, the method will merge their children and tags.
The default value is to keep the current behavior and replace nodes when they have the same name.
Should I modify the existing MoveChildrenTo in NodeContainerFormat and add an option to merge the children? I'm not sure if creating a new method called MoveMergingChildrenTo would be clearer for the user.
Description
Implements the option to merge tree nodes instead of replacing them. If we try to add a node with the same name than an existing one and the parameter is set to
false
, the method will merge their children and tags.The default value is to keep the current behavior and replace nodes when they have the same name.
Example