VisitorStrategy
object is a simplification of a strategy, which allows manipulation of the serialization process. Typically implementing a Strategy
is impractical as it requires the implementation to determine the type a node represents. Instead it is often easier to visit each node that is being serialized or deserialized and manipulate it so that the resulting XML can be customized. To perform customization in this way a Visitor
can be implemented. This can be passed to this strategy which will ensure the visitor is given each XML element as it is either being serialized or deserialized. Such an inversion of control allows the nodes to be manipulated with little effort. By default this used TreeStrategy
object as a default strategy to delegate to. However, any strategy can be used.