我有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@" />
Resulant文件:
<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>