There's nothing different in creating a page in a different namespace. All you do is pass the title with the namespace prefix. So, you use, say "Category:Alpha" as the title instead of "Alpha".
"Amruta Lonkar" amrutasl@gmail.com wrote in message news:e7ac5260602171437l408ae45frf6bf7a0d733836df@mail.gmail.com...
I forgot to type this in the previous mail. Also i am trying to add the page to a specific namespace . Can you suggest what i need to add to your code to do that?