Hi
I have spend lot of time but could not create xml like
How to achieve xml like
<person>
<user fn="Joe"/>
<lastname>Walnes</lastname>
</person>
If i have person object like
public class Person {
private String firstname;
private String lastname;
}
The above sample give the output at xml like
<person>
<firstname>Joe</firstname>
<lastname>Walnes</lastname>
</person>
Code:
public class Person {
private String firstname;
private String lastname;
}
Person joe = new Person("Joe", "Walnes");
String xml = xstream.toXML(joe);
Any help will be appreciated.
Regards
Raj
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email