There are a lot of libraries that you can use for this purpose. I take use of w3c API (which comes with JDK) for simple XML file generation. This tutorial will be helpful I think. You can also look at the API Docs if you need...
Ankit Garg wrote:There are a lot of libraries that you can use for this purpose. I take use of w3c API (which comes with JDK) for simple XML file generation. This tutorial will be helpful I think. You can also look at the API Docs if you need...
Did you use the exact same code or made some changes to it?? I tried that code and there were no exceptions. Please show us the code that you used and the stack trace of the exception...