我有一个问题,从 txt 文件中逐个字符地读取并进行更改是否更好。或者最好将txt文件转换为xml,然后在文件中进行更改?我有txt文件:
Record: 1
{
choice = mobileToMobile:{
subscriberServicesIndicator = 09,
callIdentificationNumber = 70 CD BE,
recordSequenceNumber = 40 63 0F,
typeOfCallingSubscriber = 01,
callingPartyNumber = 41 27 27 19 66 91, -> needs to be changed to 41 72 72 91 66 19
calledPartyNumber = 31 27 37 72 73 10, -> needs to be changed to 31 72 73 27 37 10
disconnectingParty = callingPartyRelease,
dateForStartofCharging = 14 0C 01 1F, -> change from hexadecimal to decimal number
timeForStartofCharging = 0A 35 00, -> ...
timeForStopofCharging = 0A 38 1D, ->
chargeableDuration = 00 03 1E,
interruptionTime = 00 00 00,
timeFromRegisterSeizureToStartOfCharging = 00 00 07,
calledSubscriberInitialServingCellID = 02 06 33,
originForCharging = 00,
}
}
Record: 2
{
...... so on
}