Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed minor markup error

...

In the example above, we add the following nodes to("mock:a").transform(constant("Bye World")) after the node with the id "bar".

Using weaveByToString

Wiki Markup
The {{weaveByToString}} also allows you to manipulate the route, for example by replacing a node with other nodes. As opposed to {{weaveById}}, this method uses the {{toString}} representation of the node(s) when matching. This allows you to match nodes, which may not have assigned ids, or to match [EIP] pattern.


You have to be a bit more careful when using this as the {{toString}} representation can be verbose and contain characters such as \[ \] ( ) -> and so forth. That is why using the regular expression matching is the must useable.

The weaveByToString has the same methods as weaceById.

...