Below is input XML code and I want to replace wherever this __
character sequence is mentioned it to be replaced by a colon :
character.
For example, if it is sbdh__sender
, it should be replace by sbdh:sender
.
<?xml version="1.0" encoding="UTF-8"?>
<ns1:EPCISDocument xmlns:ns1="http://apse.com" schemaVersion="" creationDate="">
<EPCISHeader>
<sbdh__StandardBusinessDocumentHeader>
<sbdh__HeaderVersion/>
<sbdh__Sender>
<sbdh__Identifier Authority=""/>
<sbdh__ContactInformation>
<sbdh__Contact/>
<sbdh__EmailAddress/>
<sbdh__FaxNumber/>
<sbdh__TelephoneNumber/>
<sbdh__ContactTypeIdentifier/>
</sbdh__ContactInformation>
</sbdh__Sender>
<sbdh__Receiver>
<sbdh__Identifier Authority=""/>
<sbdh__ContactInformation>
<sbdh__Contact/>
<sbdh__EmailAddress/>
<sbdh__FaxNumber/>
<sbdh__TelephoneNumber/>
<sbdh__ContactTypeIdentifier/>
</sbdh__ContactInformation>
</sbdh__Receiver>
<sbdh__Manifest>
<sbdh__NumberOfItems/>
<sbdh__ManifestItem>
<sbdh__MimeTypeQualifierCode/>
<sbdh__UniformResourceIdentifier/>
<sbdh__Description/>
<sbdh__LanguageCode/>
</sbdh__ManifestItem>
</sbdh__Manifest>
<sbdh__BusinessScope>
<sbdh__Scope>
<sbdh__BusinessService>
<sbdh__BusinessServiceName/>
<sbdh__ServiceTransaction TypeOfServiceTransaction="" IsNonRepudiationRequired="" IsAuthenticationRequired="" IsNonRepudiationOfReceiptRequired="" IsIntegrityCheckRequired="" IsApplicationErrorResponseRequired="" TimeToAcknowledgeReceipt="" TimeToAcknowledgeAcceptance="" TimeToPerform=""/>
</sbdh__BusinessService>
<sbdh__CorrelationInformation>
<sbdh__RequestingDocumentCreationDateTime/>
<sbdh__RequestingDocumentInstanceIdentifier/>
<sbdh__ExpectedResponseDateTime/>
</sbdh__CorrelationInformation>
</sbdh__Scope>
</sbdh__BusinessScope>
</sbdh__StandardBusinessDocumentHeader>
</EPCISHeader>
<EPCISBody>
<EventList>
<ObjectEvent>
<eventTime/>
<recordTime/>
<eventTimeZoneOffset/>
<epcList>
<epc type=""/>
</epcList>
<action/>
<bizStep/>
<disposition/>
<readPoint>
<id/>
</readPoint>
<bizLocation>
<id/>
</bizLocation>
<bizTransactionList>
<bizTransaction type=""/>
</bizTransactionList>
<gsk__GskEpcExtension>
<gsk__manufacturingDate>1234</gsk__manufacturingDate>
</gsk__GskEpcExtension>
</ObjectEvent>
</EventList>
</EPCISBody>
</ns1:EPCISDocument>
Any help on this will be appreciated.