Custom plugin to Append Tags or Text in XML file



When a XML file doesn't contain the definition of  XML Version and Encoding, then to utilize that XML document in the Process Designer by another activity(Mapping/Plugin)  a Custom Plugin can be used that will append XML version and Encoding to generate a valid XML. This plugin can also be utilized for appending anything before any valid XML file as per client requirement.




We have to place Custom Plugin that can be used to include XML version and encoding declaration line if it is not present. Steps to Add Custom Plugin are:-

  1. Create a Custom Plugin activity using attached Script:- Services > Extensions > Custom Plugin
  2. Set Character Set Encoding of Custom Plugin as ISO-8859-1.
  3. Place the Custom Plugin activity just after activity which  do not define XML Version and Encoding.


A process flow with Data Splitter Custom Plugin is not Working because the XML document generated from Custom plugin(Append_CP) is Input to the Data Splitter Custom Plugin and it generates a invalid XML file as it doesn't have XML version and encoding specified in the XML document. We can then create and use the attached Custom Plugin to create a Valid XML file.




Please make sure that the streaming is correct and Custom plugins are getting correct and desired input. 

The attached Plugin script can be modified to append anything before any XML file. 


Have more questions? Submit a request


Article is closed for comments.