HI Sowjanya

Thanks for your reply.

this is how I have in my binding defination :

<value style="attribute"  name="empcode" field="employeeCode"
usage="optional"/>

And its not getting me the value from my data.xml

<employee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
" empcode="TF">

Thanks for your inputs
Ajay

On Mon, Aug 25, 2008 at 10:05 AM, Janga, Sowjanya <
[EMAIL PROTECTED]> wrote:

>  You need to specify explicitly that the portion of XML you are trying to
> capture(empcode) is an attribute.
>
>
>
> <value style="attribute" name="empcode" field="publicationCode"
> usage="optional" />
>
>
>
> Hope that helps.
>
>
>
>
>
> -----Original Message-----
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *AD
> *Sent:* Monday, August 25, 2008 11:56 AM
> *To:* JiBX users
> *Subject:* [jibx-users] Attribute Access in Jibx/Java
>
>
>
> Hello Experts,
>
>
>
> How can I grab the Attribute value from an xml element tag ?
>
> say for example i have my element defined as  :
>
> <DrawBill xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> empcode="NQ">
>
> Now in my java code i would like to access EmpCode . how do i do it ?
>
> I have defined Empcode in Binding.xml as :
>
> <value name="empcode" field="publicationCode" usage="optional" />
>
> and in the Record.java its defined as :
>
> public String publicationCode; and has getters and setters :
>
>
> Thanks
>
> This email message is intended only for the addressee(s) and contains 
> information that may be confidential.
> If you are not the intended recipient please notify the sender by reply email 
> and immediately delete this message.
> Use, disclosure or reproduction of this email by anyone other than the 
> intended recipient(s) is strictly prohibited.
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> jibx-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to