I am creating many xml files and used thread class to create all the pages simultaneously but I am getting sax parser exception, so that pages are not created with required data. I am adding sample code here.

class PageThread extends Thread
{
Content content;

public createPageThread(Content content)
{
this.content = content;
}

public void run()
{
createPage(content);
}
}

This creatPage(Content) method has many methods.

I think when more than one thread try to access the same method that time we will get this error but I am not sure, If this is the case then what is the point of using threads?

Can anyone help me to solve this issue...