B
Bill nguyen
I'm looking for a good routine to parse the following text pattern:
a:18: {i:0;i:408;i:1;i:409;i:2;i:410;i:3;i:411;i:4;i:413;i:5;i:414;}
a: = page_id
a:18 -> page_id = 18
Those within curly brackets { }
i:0;i:408
the 1st group i:0;
i : section order within a page (in this case page with page_id = 18)
i:0 -> section_order = 0 (top of page)
the 2nd group i:408;
i: section_id
i:408 -> section_id = 408
therefore, {i:0;i:408;} -> section_id 408 has section_order_id 0
This is a weird way to arrange data. I'd rather assign a different letter to
section_id so that the above example can be rewritten as:
a:18{i:0;s:408;...} where s = section_id
By the way, if you're familiar with or care about phpWebsite CMS (LAMP or
LinuxApacheMysqlPhp world), this come from the page master mod in their open
source app. I'm trying to penetrate their world with .NET
Your help regarding the parsing routine is greatly appreciated.
Bill
a:18: {i:0;i:408;i:1;i:409;i:2;i:410;i:3;i:411;i:4;i:413;i:5;i:414;}
a: = page_id
a:18 -> page_id = 18
Those within curly brackets { }
i:0;i:408
the 1st group i:0;
i : section order within a page (in this case page with page_id = 18)
i:0 -> section_order = 0 (top of page)
the 2nd group i:408;
i: section_id
i:408 -> section_id = 408
therefore, {i:0;i:408;} -> section_id 408 has section_order_id 0
This is a weird way to arrange data. I'd rather assign a different letter to
section_id so that the above example can be rewritten as:
a:18{i:0;s:408;...} where s = section_id
By the way, if you're familiar with or care about phpWebsite CMS (LAMP or
LinuxApacheMysqlPhp world), this come from the page master mod in their open
source app. I'm trying to penetrate their world with .NET
Your help regarding the parsing routine is greatly appreciated.
Bill