Re: [Simple-support] element value from within elementlist
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-04-29 23:47:50
|
The same way, there should be no difference. --- On Fri, 29/4/11, Arjan Duijs <arj...@gm...> wrote: From: Arjan Duijs <arj...@gm...> Subject: [Simple-support] element value from within elementlist To: sim...@li... Received: Friday, 29 April, 2011, 5:57 AM Hi, below is a snipped from my XML file. <character> <etools-version>1.5.666</etools-version> <name>Vangkor</name> <player>Eric Noah</player> <gender>Male</gender> <hair>Black, balding</hair> <eyes>Dark brown</eyes> <race>Half-Orc</race> <experience>67145</experience> <options> <gamemode> <name>D&&D v3.0e</name> <index>0</index> <style>0</style> <dbase>Database_v30e.mdb</dbase> </gamemode> <revised-weapon-mode>0</revised-weapon-mode> <spell-sorting>-1</spell-sorting> <text-offhand-indication>0</text-offhand-indication> <armor-as-damage-reduction>0</armor-as-damage-reduction> <loaded-sources> <name>Players Handbook 3e</name> <name>Dungeon Masters Guide 3e</name> <name>Monster Manual 3e</name> </loaded-sources> </options> </character> I created all the model classes as per tutorial, and am able to load them in my main java file. Character character = serializer.read(Character.class, xmlData, false); I can access the value of <name> by simply saying: character.name and it gives me the value Vangkor... but to get the value of an element in <options> doesnt work that way.. how do i retrieve the value of ..lets say: <text-offhand-indication> ? 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 |