Passing data as event params

When the button is clicked a snippet of XML is created and passed along in the 'custom' event that is dispatched to the document. A fx-replace action will handle that event and replace the instance data with the nodes carried by the event..