First a fall, you have a mistake in xml formation.
The output of your xml looks like this.
<messages>
<date>strDate</date>
<time>strTime</time>
<subject>strSubject</subject>
<ajanta>strAjanta</ajanta>
</messages>
Here xml will consider
<message></message>
as the parent node and if u inserted one more record, the same parent node is again created,so xml cannot create.
For this you need to have one parent and inside that sub- parent, your xml formation should be like this,
<all-message>
<messages id="0">
<date>strDate</date>
<time>strTime</time>
<subject>strSubject</subject>
<ajanta>strAjanta</ajanta>
</messages>
<messages id="1">
<date>strDate1</date>
<time>strTime1</time>
<subject>strSubject1</subject>
<ajanta>strAjanta1</ajanta>
</messages>
</all-message>
if you have your own unique id for
<message></message>
it will be useful,incase you printing only that required <message>.
Hope this link will help for your question:
http://msdn.microsoft.com/en-us/library/5x8bxy86(v=vs.80).aspx[
^]