View Single Post
Old 02-19-2009, 03:48 AM   #1 (permalink)
hibbert
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default XML serializer: XML -> myClass

Please Login to Remove!

Hi,
in vb.net there is a way to serialize a class to a XML-document and the other way round.
Is there also a simple way to do this in java for BlackBerry? I get a XML-document such like this one here:
Quote:
<myDoc>
<user>
<name>Name1</name>
<vorname>Vorname1</vorname>
</user>
<user>
<name>Name2</name>
<vorname>Vorname2</vorname>
</user>
...
</myDoc>
Now I've got my Class user:
Code:
class user {
public String Name;
public String Vorname;
user() {}
}
And now i want to pasre the XML-String and after parsing I want to have a Vector. The Vector should contain n elements of class user, created from the XML-String.

So is there a Simple way to do this? Is there a kind of function which I can use for other classes also??

I hope you know what i want to do, and i hope that someone can help me

thanks, hibbert
__________________
My English is so bad, that makes me nobody so quickly after
Offline   Reply With Quote