consider i have 2xml files haveing same structure dont have dtd
xml1 :
<DigestType name="Blogs">
<From>[email protected]</FromEmail>
<EmailTimeStamp></EmailTimeStamp>
<EmailSubject></EmailSubject>
<BlogName href="">Merging XML</BlogName>
<Blog Count="2">
<listPost>
<Title href="">Title</Title>
<CommentCount>10</CommentCount>
<Content>Post content...</Content>
</listBlogPost>
<listPost>
<Title href="">Title1</Title>
<CommentCount>10</CommentCount>
<Content>Post content...</Content>
</listBlogPost>
</Blog>
</DigestType>
xml2 :
<DigestType name="Blogs">
<From>[email protected]</FromEmail>
<EmailTimeStamp></EmailTimeStamp>
<EmailSubject></EmailSubject>
<BlogName href="">Merging XML</BlogName>
<Blog Count="2">
<listPost>
<Title href="">Title2</Title>
<CommentCount>1</CommentCount>
<Content>content...</Content>
</listBlogPost>
<listPost>
<Title href="">Title3</Title>
<CommentCount>23</CommentCount>
<Content>content...</Content>
</listBlogPost>
</Blog>
now i want to merge these 2 xml as one like
<DigestType name="Blogs">
<From>[email protected]</FromEmail>
<EmailTimeStamp></EmailTimeStamp>
<EmailSubject></EmailSubject>
<BlogName href="">Merging XML</BlogName>
<Blog Count="4">
<listPost>
<Title href="">Title</Title>
<CommentCount>10</CommentCount>
<Content>Post content...</Content>
</listBlogPost>
<listPost>
<Title href="">Title1</Title>
<CommentCount>10</CommentCount>
<Content>Post content...</Content>
</listBlogPost>
<listPost>
<Title href="">Title2</Title>
<CommentCount>1</CommentCount>
<Content>content...</Content>
</listBlogPost>
<listPost>
<Title href="">Title3</Title>
<CommentCount>23</CommentCount>
<Content>content...</Content>
</listBlogPost>
</Blog>
</DigestType>
Im using java. can anyone help me to find out the solution.
Thanks uma