I did try that already. It seems to be not working or I'm not doing the
right way. Here is my example. Please correct me if I did wrong.
<binding>
<mapping....>
....
<value name = "BIOSNAME" style="attribute" field = "biosName"
usage="optional" default="hhhhh"/>
</mapping>
...
</binding>
I don't see the default value(hhhhh) when I marshall the object with no
value set for the biosName in the object.
Thanks,
Venkat
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, October 29, 2004 9:39 PM
To: [EMAIL PROTECTED]
Subject: jibx-devs digest, Vol 1 #144 - 2 msgs
Send jibx-devs mailing list submissions to
[EMAIL PROTECTED]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/jibx-devs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of jibx-devs digest..."
Today's Topics:
1. Default value for optional (Venkat Mylavarapu)
2. Re: Default value for optional (Dennis Sosnoski)
--__--__--
Message: 1
Date: Fri, 29 Oct 2004 10:13:19 -0600
From: "Venkat Mylavarapu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: [jibx-devs] Default value for optional
Reply-To: [EMAIL PROTECTED]
This is a multi-part message in MIME format.
------_=_NextPart_001_01C4BDD2.373F6678
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
I have a situation here. I need to set a default value for the optional
values in the binding. How do I do that in the binding file. Is there a
way that I expose my all fields in the object in the xml file even
though they don't have any values set.
=20
Thanks,
=20
Venkat
------_=_NextPart_001_01C4BDD2.373F6678
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I have a situation here. I need to set a default =
value for
the optional values in the binding. How do I do that in the binding =
file. Is there
a way that I expose my all fields in the object in the xml file even =
though
they don’t have any values set.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Thanks,<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Venkat<o:p></o:p></span></font></p>
</div>
</body>
</html>
------_=_NextPart_001_01C4BDD2.373F6678--
--__--__--
Message: 2
Date: Fri, 29 Oct 2004 10:51:54 -0700
From: Dennis Sosnoski <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [jibx-devs] Default value for optional
Reply-To: [EMAIL PROTECTED]
Venkat Mylavarapu wrote:
I have a situation here. I need to set a default value for the
optional values in the binding. How do I do that in the binding file.
Is there a way that I expose my all fields in the object in the xml
file even though they don't have any values set.
default="value" works for simple values. You should probably review the
tutorial, since this is pretty basic stuff covered there.
- Dennis