Hi
Any ideas....
I am reading a file where I have to extract some information and modify some parameters
based on one value that its not present at the begining of the data "AAL2UPVCI", but its part of a node.
e.g I have to modify parameter4 and parameter5, but if the block contains
<p name="AAL2UPVCI">41</p> I have to put the value for parameter4 and parameter5 corresponding to VCI 41.
Problem is that parameterx have same name in different blocks.
Real data looks like this, I wont use XML parser since I just want to read the file and overwrite soem specific values. I will use regex
just not clear for me the logic to use.
dmazzini
GSM/UMTS System and Telecomm Consultant
Any ideas....
I am reading a file where I have to extract some information and modify some parameters
based on one value that its not present at the begining of the data "AAL2UPVCI", but its part of a node.
e.g I have to modify parameter4 and parameter5, but if the block contains
<p name="AAL2UPVCI">41</p> I have to put the value for parameter4 and parameter5 corresponding to VCI 41.
Problem is that parameterx have same name in different blocks.
Code:
$PARAMETERS{parameter1}{VCI41}=1000;
$PARAMETERS{parameter1}{VCI47}=500;
Code:
<item>
parameter1
parameter2
parameter3
parameter4 <value to modify based on VCI value>
parameter5
parameter6
parameter7
<p name="AAL2UPVCI">47</p>
parameter2
parameter2
parameter2
<item/>
<item>
parameter1
parameter2
parameter3
parameter4
parameter5
parameter6
parameter7
<p name="AAL2UPVCI">45</p>
parameter2
parameter2
parameter2
<item>
<item>
parameter1
parameter2
parameter3
parameter4
parameter5
parameter6
parameter7
<p name="AAL2UPVCI">49</p>
parameter2
parameter2
parameter2
<item>
Real data looks like this, I wont use XML parser since I just want to read the file and overwrite soem specific values. I will use regex
just not clear for me the logic to use.
Code:
<managedObject class="COCO" version="RN5.0" distName="PLMN-PLMN/RNC-424/COCO-1002" id="192750000001528078">
<p name="AAL2LossRatio">-3</p>
<p name="AAL2Multiplexing">Multiplexing disabled</p>
<p name="AAL2MuxDelay">100</p>
<p name="AAL2QueueHSDPAWithFC">7000</p>
<p name="AAL2QueueHSDPAWithoutFC">2048</p>
<p name="AAL2QueueHSUPA">512</p>
<p name="AAL2QueueNRTDCHWithFC">7000</p>
<p name="AAL2QueueNRTDCHWithoutFC">2048</p>
<p name="AAL2QueueRTDCH">512</p>
<list name="AAL2SignLinkTP">
<item>
<p name="AAL2SigCDVT01Egr">20000</p>
<p name="AAL2SigCDVT01Ing">20000</p>
<p name="AAL2SigEarlyPacketDiscard">disabled</p>
<p name="AAL2SigEgressMDCR">4294967295</p>
<p name="AAL2SigEgressUBRShare">0</p>
<p name="AAL2SigIngressMDCR">4294967295</p>
<p name="AAL2SigIngressUBRShare">0</p>
<p name="AAL2SigPCR01Egr">50</p>
<p name="AAL2SigPCR01Ing">50</p>
<p name="AAL2SigPartialPacketDiscard">disabled</p>
<p name="AAL2SigServiceCategory">CBR</p>
<p name="AAL2SignLinkATMIfId">5</p>
<p name="AAL2SignLinkTPId">1</p>
<p name="AAL2SignLinkVCI">38</p>
<p name="AAL2SignLinkVPI">21</p>
</item>
</list>
<list name="AAL2TP">
<item>
<p name="AAL2FallbAttribute">Disabled</p>
<p name="AAL2PathId">1002001</p>
<p name="AAL2PathType">Stringent</p>
<p name="AAL2SignLinkATMIfId">5</p>
<p name="AAL2SignLinkVCI">38</p>
<p name="AAL2SignLinkVPI">21</p>
<p name="AAL2UPATMIfId">5</p>
<p name="AAL2UPCDVT01Egr">334</p>
<p name="AAL2UPCDVT01Ing">334</p>
<p name="AAL2UPEgressMDCR">4294967295</p>
<p name="AAL2UPEgressUBRShare">0</p>
<p name="AAL2UPIngressMDCR">4294967295</p>
<p name="AAL2UPIngressUBRShare">0</p>
<p name="AAL2UPPCR01Egr">3000</p>
<p name="AAL2UPPCR01Ing">3000</p>
<p name="AAL2UPServiceCategory">CBR</p>
<p name="AAL2UPUsage">DCH & HSPA</p>
<p name="AAL2UPVCI">40</p>
<p name="AAL2UPVPI">21</p>
<p name="COCOA2EA">4901002000</p>
<p name="VCCInBundle">VCC is in first Bundle</p>
<p name="WAMId">1</p>
</item>
<item>
<p name="AAL2FallbAttribute">Disabled</p>
<p name="AAL2PathId">1002002</p>
<p name="AAL2PathType">Tolerant</p>
<p name="AAL2SignLinkATMIfId">5</p>
<p name="AAL2SignLinkVCI">38</p>
<p name="AAL2SignLinkVPI">21</p>
<p name="AAL2UPATMIfId">5</p>
<p name="AAL2UPCDVT01Egr">309</p>
<p name="AAL2UPCDVT01Ing">309</p>
<p name="AAL2UPEgressMDCR">100</p>
<p name="AAL2UPEgressUBRShare">50</p>
<p name="AAL2UPIngressMDCR">100</p>
<p name="AAL2UPIngressUBRShare">50</p>
<p name="AAL2UPPCR01Egr">3240</p>
<p name="AAL2UPPCR01Ing">3240</p>
<p name="AAL2UPServiceCategory">UBR+</p>
<p name="AAL2UPUsage">HSPA</p>
<p name="AAL2UPVCI">46</p>
<p name="AAL2UPVPI">21</p>
<p name="COCOA2EA">4901002000</p>
<p name="VCCInBundle">VCC is in first Bundle</p>
<p name="WAMId">1</p>
</item>
<item>
<p name="AAL2FallbAttribute">Disabled</p>
<p name="AAL2PathId">1002003</p>
<p name="AAL2PathType">Stringent bi-level</p>
<p name="AAL2SignLinkATMIfId">5</p>
<p name="AAL2SignLinkVCI">38</p>
<p name="AAL2SignLinkVPI">21</p>
<p name="AAL2UPATMIfId">5</p>
<p name="AAL2UPCDVT01Egr">309</p>
<p name="AAL2UPCDVT01Ing">309</p>
<p name="AAL2UPEgressMDCR">20</p>
<p name="AAL2UPEgressUBRShare">1000</p>
<p name="AAL2UPIngressMDCR">20</p>
<p name="AAL2UPIngressUBRShare">1000</p>
<p name="AAL2UPPCR01Egr">3240</p>
<p name="AAL2UPPCR01Ing">3240</p>
<p name="AAL2UPServiceCategory">UBR+</p>
<p name="AAL2UPUsage">DCH & HSPA</p>
<p name="AAL2UPVCI">47</p>
<p name="AAL2UPVPI">21</p>
<p name="COCOA2EA">4901002000</p>
<p name="VCCInBundle">VCC is in first Bundle</p>
<p name="WAMId">1</p>
</item>
</list>
<p name="ATMEPProfileId">0</p>
<p name="CNBAPCDVT01Egr">20000</p>
<p name="CNBAPCDVT01Ing">20000</p>
<p name="CNBAPEarlyPacketDiscard">disabled</p>
<p name="CNBAPEgressMDCR">4294967295</p>
<p name="CNBAPEgressUBRShare">0</p>
<p name="CNBAPIngressMDCR">4294967295</p>
<p name="CNBAPIngressUBRShare">0</p>
<p name="CNBAPPCR01Egr">50</p>
<p name="CNBAPPCR01Ing">50</p>
<p name="CNBAPPartialPacketDiscard">disabled</p>
<p name="CNBAPServiceCategory">CBR</p>
<p name="CNBAPTPATMIfId">5</p>
<p name="CNBAPVCI">36</p>
<p name="CNBAPVPI">21</p>
<p name="COCOChangeOrigin">NetAct RNW plan originated configuration action</p>
<p name="CalculateCDVT">Calculated</p>
<p name="CreateATMTP">Created</p>
<list name="DNBAPTP">
<item>
<p name="CControlPortID">1</p>
<p name="DNBAPATMIfId">5</p>
<p name="DNBAPCDVT01Egr">10000</p>
<p name="DNBAPCDVT01Ing">10000</p>
<p name="DNBAPEarlyPacketDiscard">disabled</p>
<p name="DNBAPEgressMDCR">4294967295</p>
<p name="DNBAPEgressUBRShare">0</p>
<p name="DNBAPIngressMDCR">4294967295</p>
<p name="DNBAPIngressUBRShare">0</p>
<p name="DNBAPPCR01Egr">100</p>
<p name="DNBAPPCR01Ing">100</p>
<p name="DNBAPPartialPacketDiscard">disabled</p>
<p name="DNBAPServiceCategory">CBR</p>
<p name="DNBAPVCI">37</p>
<p name="DNBAPVPI">21</p>
</item>
</list>
<p name="DynNRTDCHSchedPathSwitch">On</p>
<p name="GenerateAAL2Num">One A2EA for BTS</p>
<p name="InternalHSDPAFCMethodBTS">Dynamic</p>
<list name="VCCBundleParams">
<item>
<p name="VCCBundleEBS">95</p>
<p name="VCCBundleId">78</p>
<p name="VCCBundlePCR">3240</p>
</item>
<item>
<p name="VCCBundleEBS">95</p>
<p name="VCCBundleId">65535</p>
<p name="VCCBundlePCR">4800</p>
</item>
</list>
<list name="VPLTP">
<item>
<p name="COCOVPI">21</p>
<p name="VPLTPATMIfId">5</p>
<p name="VPLTPCDVT01Egr">279</p>
<p name="VPLTPEgressMDCR">4294967295</p>
<p name="VPLTPPCR01Egr">3591</p>
<p name="VPLTPServiceCategory">CBR</p>
<p name="VPLTPTrafficShaping">none</p>
</item>
</list>
</managedObject>
dmazzini
GSM/UMTS System and Telecomm Consultant