Here is a blurb from the Castor maillist guidelines at http://castor.exolab.org/lists.html 
 
1. Please refrain from using words and phrases like URGENT, IMPORTANT,
   MY WIFE WILL LEAVE ME IF YOU DO NOT RESPOND, etc, in the subject line
   of your postings. Or even in the body of the message for that matter.
 
 
However, I just so happen to be interested in your issue
My DOM is a bit rusty, but this code should do the trick.
 
 
      //Here, I instantiate and populate my Castor-generated Value Objects
      //The impl. of the method createRq() is not shown here.
      FundsTransferRq rq = createRq();
     
      Document doc = new org.apache.xerces.dom.DocumentImpl();
      Element ele = doc.createElement("tempEle");
      doc.insertBefore(ele,null);
     
      Marshaller m = new Marshaller((Node)ele);
      try {
         m.marshal(rq);
        
         NodeList kids = ele.getChildNodes();
        
         for (short j = 0; j < kids.getLength(); ++j) {
            Node tmp = kids.item(j);
            System.out.println("tmp [" + tmp.getNodeName() + "]");
         }
        
        
      } catch (MarshalException x) {
         x.printStackTrace();
         Assert.fail();
      }
     
-----Original Message-----
From: Othman Haddad [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 2:35 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] [URGENT] marshall(Node node)..

hi,
i really need an answer to this question..
in an mail before i've been told that castor can marshall objects to DOM instead of xml, i found the constructor: the constructor
Marshaller(Node node).
in the Marshaller.java class, but :
1) can i have an example of how to use it?
2)where can i store the DOM document after the marshaller?
i mean you store in general the xml result in a file.xml  ,so how about DOM?
 
thank you very much for your help!
________________________________________________________________
  IncrediMail - La messagerie �lectronique a enfin �volu� - Cliquer ici

Reply via email to