1

我有 2 个文件输入文件和替换文件。我想用替换@@CONTENT_TO_REPLACE@@文件的所有内容替换输入文件中的令牌()。

输入文件:

<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>

替换文件:

<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
    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>
4

0 回答 0