-
Castor Marshalling- To generate Empty tag for unpopulated fields (2 messages)
- Posted by: Dinesh Abrol
- Posted on: July 09 2006 11:10 EDT
Hi All, I am trying to marshall a java class to XML using CASTOR (castor-1.0M2.jar). If the value of a field in java object is null, then Castor does not generate an empty tag for that field in XML. It simply ignores that field and generates xml content for the next non-null field. Is there a way to overirde this behaviour? It would otherwise result in invalid XML (w.r.t XSD). Thanks, DineshThreaded Messages (2)
- Re: Castor Marshalling- To generate Empty tag for unpopulated fields by Biswa Das on July 11 2006 03:10 EDT
- Re: Castor Marshalling- To generate Empty tag for unpopulated fields by jayasree Vootukuru on December 14 2007 12:03 EST
-
Re: Castor Marshalling- To generate Empty tag for unpopulated fields[ Go to top ]
- Posted by: Biswa Das
- Posted on: July 11 2006 03:10 EDT
- in response to Dinesh Abrol
Make sure the object.toString() Method returns "" empty string. -
Re: Castor Marshalling- To generate Empty tag for unpopulated fields[ Go to top ]
- Posted by: jayasree Vootukuru
- Posted on: December 14 2007 12:03 EST
- in response to Biswa Das
Hi dinesh, I am also having the same problem. Did you get any solution? Hi Biswa Das, Is there any other solution?