Yes, you are absolutely right.. We need to increment the line by one and field ID by 20. Whatever my be the fied id.. Thanks,
On 2/12/10, John W. Krahn <jwkr...@shaw.ca> wrote: > > elavazhagan perl wrote: > >> Hope,this time I will make you clear. >> >> Our script converts the original content to current output ,what we need >> is >> the desired output. >> > > So I take it by "line" you actually mean "Field record"? > > > *ORIGINAL CONTENT:* >> >> <Field ID="*20000*"> >> <AttrSet ID="Core"> >> <integer ID="ZoneId" Value="999" /> >> <string ID="Name" Value="42_*L1*_Valid_Line_Indicator_*20000*" /> >> <boolean ID="LinkedCoord" Value="false" /> >> <integer ID="Type" Value="3" /> >> <integer ID="x" Value="0" /> >> <integer ID="y" Value="0" /> >> <integer ID="w" Value="10" /> >> <integer ID="h" Value="10" /> >> </AttrSet> >> </Field> >> >> *CURRENT OUTPUT:* >> >> <Field ID="*20020*"> >> <AttrSet ID="Core"> >> <integer ID="ZoneId" Value="999" /> >> <string ID="Name" Value="42_*L2*_Valid_Line_Indicator_*20020*" /> >> <boolean ID="LinkedCoord" Value="false" /> >> <integer ID="Type" Value="3" /> >> <integer ID="x" Value="0" /> >> <integer ID="y" Value="0" /> >> <integer ID="w" Value="10" /> >> <integer ID="h" Value="10" /> >> </AttrSet> >> </Field> >> >> *DESIRED OUTPUT:* >> >> <Field ID="*20980*"> >> <AttrSet ID="Core"> >> <integer ID="ZoneId" Value="999" /> >> <string ID="Name" Value="42_*L1000*_Valid_Line_Indicator_*20980*" >> /> >> <boolean ID="LinkedCoord" Value="false" /> >> <integer ID="Type" Value="3" /> >> <integer ID="x" Value="0" /> >> <integer ID="y" Value="0" /> >> <integer ID="w" Value="10" /> >> <integer ID="h" Value="10" /> >> </AttrSet> >> </Field> >> > > The original 'Field ID' starts out at 20000 and ends up at 20980. If you > increment that by 20 each time then that is 49 changes to 'Field ID'. The > 'string ID' value starts out at 1 and ends up at 1000 which is 999 changes. > If both values are changed at the same time then they should both have the > same number of changes. So how do you determine when to change one value > and not the other? > > > > > John > -- > The programmer is fighting against the two most > destructive forces in the universe: entropy and > human stupidity. -- Damian Conway > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > >