|
Hi Sam,
Can you maybe send an example of the XML your getting and
what you would prefer to see?
Cheers,
Andy. From: Sam Huang [mailto:[EMAIL PROTECTED] Sent: 27 April 2005 04:43 To: [email protected] Subject: [castor-user] How to control marshall in detail? Hello,
I am a new comer to Castor and want to have more examples
to study on. I used to find some one developerworks and javaworld but seems
cannot satisfy my need.
I follow the example on JavaWorld but change with my own
class:
import org.exolab.castor.xml.*;
import java.io.FileWriter; import java.io.FileReader; public class MyClass {
Vector v1, v2,
v3;
public
MyClass(Vector v1, Vector v2, Vector v3){
this.v1 = v1;
this.v2 = v2;
this.v3 = v3;
}
public static void main(String args[]) { try { FileWriter file = new FileWriter("myclass.xml"); Marshaller.marshal(this, file); file.close(); } catch (Exception e) { System.out.println( e ); } } } The result it generated is too simple to match my
expection, how can I control the output in detail? Thanks!
|

