1

I have 2 files input file and replace file. I want to replace a token(@@CONTENT_TO_REPLACE@@) in input file with all the contents of replace file.

Input file:

<amxdata_base:Enterprise
    xmlns:amxdata="http://tibco.com/amxadministrator/command/line/types"
    xmlns:amxdata_base="http://tibco.com/amxadministrator/command/line/types_base"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

    <!-- Enterprise level Substitution variables -->

    @@CONTENT_TO_REPLACE@@

</amxdata_base:Enterprise>

Replace file:

<SVar xsi:type="amxdata_base:SubstitutionVariable" name="JMS_CONNECTION_TOPIC_FACTORY" type="String" value="@SVAR_ENT_JMS_CONNECTION_TOPIC_FACTORY@" /> 
<SVar xsi:type="amxdata_base:SubstitutionVariable" name="JMS_CONNECTION_QUEUE_FACTORY" type="String" value="@SVAR_ENT_JMS_CONNECTION_QUEUE_FACTORY@" /> 

Resulant file:

<amxdata_base:Enterprise
    xmlns:amxdata="http://tibco.com/amxadministrator/command/line/types"
    xmlns:amxdata_base="http://tibco.com/amxadministrator/command/line/types_base"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

    <!-- Enterprise level Substitution variables -->

    <SVar xsi:type="amxdata_base:SubstitutionVariable" name="JMS_CONNECTION_TOPIC_FACTORY" type="String" value="@SVAR_ENT_JMS_CONNECTION_TOPIC_FACTORY@" /> 
    <SVar xsi:type="amxdata_base:SubstitutionVariable" name="JMS_CONNECTION_QUEUE_FACTORY" type="String" value="@SVAR_ENT_JMS_CONNECTION_QUEUE_FACTORY@" /> 

</amxdata_base:Enterprise>
martin clayton
  • 76,436
  • 32
  • 213
  • 198

0 Answers0