Subject:Replace nodes in one xml file into another Author:suresh chinta Date:31 Mar 2010 03:56 PM
Hello All:
I am trying to automate a process. I need to replace the nodes in
original xml file with those listed in a config xml file. Here is a
condensed version of files. Can some one suggest a way to replace the
nodes if the name in config xml matches the original xml file. FYI,
there are several instances of MQSourceProtocolHandler nodes
available.
Original xml file:
<MQSourceProtocolHandler name="RR_OP_ECMAP_FSH"
xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:dp="http://www.datapower.com/schemas/management">
<mAdminState>enabled</mAdminState>
<UserSummary>Route to MAP</UserSummary>
<QueueManager class="MQQM">Mainframe_QMGR_MQDA_EJB</QueueManager>
<GetQueue>KEPG2.FEPDIR.ESB.FCRLPP.XQ0000</GetQueue>
<CodePage>0</CodePage>
<GetMessageOptions>4097</GetMessageOptions>
<ParseProperties>off</ParseProperties>
<AsyncPut>off</AsyncPut>
<ConcurrentConnections>1</ConcurrentConnections>
<PollingInterval>30</PollingInterval>
<BatchSize>0</BatchSize>
<ContentTypeHeader>None</ContentTypeHeader>
<RetrieveBackoutSettings>off</RetrieveBackoutSettings>
<UseQMNameInURL>off</UseQMNameInURL>
</MQSourceProtocolHandler>
Config xml file:
<MQSourceProtocolHandler name="RR_OP_ECMAP_FSH">
<QueueManager class="MQQM">Mainframe_QMGR_MQDA_EJB</QueueManager>
<GetQueue>KEPK2.OP.ESB.RR.QL0000</GetQueue>
</MQSourceProtocolHandler>