[xml] record count and display



Hi,

I want to display 3 items in a page and when the user scolls down, another 3 items is displayed. Whenever the user selects a category, the stories with matching Category tag are returned and displayed. The category is displayed 3 stories at a time. When the user scrolls down and wants access to additional stories from the category, another 3 stories are displayed. The Count is used in the process and when it reaches 3, it will reset and get the next 3 stories. Does libxml2 have functions that can search and do that?
This is what I have, please tell me it's right or not:

if ((!xmlStrcmp(cur->name, (const xmlChar *)"business")))
        count++;
for(i=1;i<=count;i++)
{
contentData = xmlNodeListGetString(doc, cur->children, 1);
count--;
if (count % 3 == 0)
return;
}

How do I display the next 3 records?
Thank you.

_________________________________________________________________
Limited-time offer: Fast, reliable MSN 9 Dial-up Internet access FREE for 2 months! http://join.msn.com/?page=dept/dialup&pgmarket=en-us&ST=1/go/onm00200361ave/direct/01/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]