I am using your code for creating breadcrumb, but it has a bug. No breadcrumb is displayed for a page which has 1 parent node. But if a page has 2parent nodes then its displaying it correctly.
Also i need to create breadcrumb for posts also.
i think it can be done by making a page as a parent for a post, so it will be easy to create breadcrumb.
Since i am using blogengine as a CMS. All posts links are from a page.