Re: [Simple-support] model notation for example below
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-05-05 10:33:54
|
Your list needs to be inline @ElementList (name="feature", required= false, inline=true)
--- On Tue, 3/5/11, Arjan Duijs <arj...@gm...> wrote:
From: Arjan Duijs <arj...@gm...>
Subject: [Simple-support] model notation for example below
To: sim...@li...
Received: Tuesday, 3 May, 2011, 6:55 AM
Hi All,
In my XML i got the following structure, but with everything i try to write in the model, i keep getting nullpointerexceptions on the <feature>
How is <feature> being treated in this example? Element? List? Array? something else?
<features>
<class-features>
<class-feature>
<name>Druid</name>
<feature>Proficiency: Armor, Light</feature>
<feature>Nature Sense</feature>
<feature>Spells</feature>
<feature>Proficiency: Armor, Medium</feature>
<feature>Wild Empathy (5+Cha.Mod)</feature>
<feature>Animal Companion</feature>
<feature>Druidic weapons</feature>
<feature>Proficiency: Shields</feature>
<feature>Spontaneous casting (Druid)</feature>
<feature>Secret Language: Druidic</feature>
<feature>Woodland Stride</feature>
<feature>Trackless Step</feature>
<feature>Resist Nature`s Lure</feature>
<feature>Wild Shape: 1x/day</feature>
<feature>Wild Shape (Small, Medium)</feature>
</class-feature>
</class-features>
</features>
Classes:
-------------------------------------------------------
ClassFeatures Class
-------------------------------------------------------
@Element(name="class-feature")
public class ClassFeatures {
@Element(name="name", required = false)
public String name;
@ElementList (name="feature", required= false)
public List<ClassFeatureList> feature;
}
-------------------------------------------------------
ClassFeatureList Class
-------------------------------------------------------
@Element(name="class-feature")
public class ClassFeatureList {
@Element(name="feature",required=false)
public String feature;
}
thanks
Arjan
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|