I'm using xStream to manipulate XML. All is okay. To put on XML archive and other things. But, I have a problem:
Example: My xml contains a tag , and inside this one, I have some more tags named <comment>
. Look at a example code:
<comments>
<comment>
<id>1</id>
<desc>A comment</desc>
</comment>
<comment>
<id>2</id>
<desc>Another comment</desc>
</comment>
<comment>
<id>3</id>
<desc>Another one comment</desc>
</comment>
</comments>
And progressivelly. I can do 500 tags inside the tag. And these comments are of type comment.
How I can do to serialize with the xStream to put all of these tags in the classes? I don't how to make in the class to it receive the various objects.
Obviously, I will make this with an Array, or some other. But I don't know how I can do this.