Re: [Simple-support] Dupliate attributes, but different xpaths
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-08-05 08:29:24
|
Remove @Path("/") it will work then
--- On Thu, 4/8/11, Rosczak, Jan <Jan...@hl...> wrote:
> From: Rosczak, Jan <Jan...@hl...>
> Subject: [Simple-support] Dupliate attributes, but different xpaths
> To: "sim...@li..." <sim...@li...>
> Received: Thursday, 4 August, 2011, 11:03 PM
> Hello,
>
> I would like to map the following XML
>
>
> <application name='SpecialApplication'>
> <system value='SPECIAL_SYSTEM' />
> <tranCode value='X3320' />
> </application>
>
> to the Java class
>
> @Root(name = "application")
> public class Application {
> @Attribute()
> @Path("/")
> private String name;
>
> @Path("system")
> @Attribute(name = "value")
> private String system;
>
> @Path("tranCode")
> @Attribute(name = "value")
> private String transactionCode;
>
> But, that does not work.
>
> First of all is the root path in the @Path annotation not
> supported, maybe there is another way to reference the root
> element?
>
> Then the framework complaints about the duplicate attribute
> "value" although I would think that the attributes reference
> different elements as denoted by the @Path annotation.
>
> Can this XML be mapped at all?
>
> Thanks and kind regards
>
> Jan Rosczak
> IT Architect
> Development Methods, Frameworks & Tools
> __________________________________
>
> Hapag-Lloyd AG
> Ballindamm 25
> D-20095 Hamburg
>
> Phone +49 (40) 3001- 2983
> Fax +49 (40) 3001- 2942
> Mail jan...@hl...
>
>
> http://www.hapag-lloyd.com
>
> Vorsitzender des Aufsichtsrats: Dr. Michael Frenzel
> Vorstand: Michael Behrendt (Vorsitzender), Peter Ganz,
> Ulrich Kranich, Jesper Praestensgaard
> Sitz: Hamburg, Handelsregister: Amtsgericht Hamburg HRB
> 97937
>
> Chairman of the Supervisory Board: Dr. Michael Frenzel
> Executive Board: Michael Behrendt (Chairman), Peter Ganz,
> Ulrich Kranich, Jesper Praestensgaard
> Registered Seat: Hamburg, Company Register: Amtsgericht
> Hamburg HRB 97937
>
>
> ------------------------------------------------------------------------------
> BlackBerry® DevCon Americas, Oct. 18-20, San
> Francisco, CA
> The must-attend event for mobile developers. Connect with
> experts.
> Get tools for creating Super Apps. See the latest
> technologies.
> Sessions, hands-on labs, demos & much more. Register
> early & save!
> http://p.sf.net/sfu/rim-blackberry-1
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
|