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!
 
Regards,
Sam Hwang
 




The information in this message is confidential and may be legally privileged. It may not be disclosed to, or used by, anyone other than the addressee. If you receive this message in error, please advise us immediately.

Internet emails are not necessarily secure. CODA does not accept responsibility for changes to any email which occur after the email has been sent. Attachments to this email may contain software viruses, which could damage your systems. CODA has checked the attachments for viruses before sending, but you should virus-check them before opening.

Reply via email to