I'm doing my work for conclusion of college.
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 <comments>, and inside this one, I have some more tags named <comment>. Look at a example code:
Expand|Select|Wrap|Line Numbers
- <comments>
- <comment>
- <id>1</id>
- <desc>A comment</desc>
- </comments>
- <comment>
- <id>2</id>
- <desc>Another comment</desc>
- </comments>
- <comment>
- <id>3</id>
- <desc>Another one comment</desc>
- </comments>
- </comments>
I can do 500 <coment> tags inside the <comments> tag. And these comments are of type comment.
How I can do to serialize with the xStream to put all of these <comment> tags o the classes?
Obviously, I will make this with an Array, or some other.
But I don't know how I can do this.
Someone help me?
And sorry for the gramatical errors. I'm Brazilian :D