A naive script to insert certain snippets into an XML stream