users@jaxb.java.net

Re: property list

From: Kenny MacLeod <kennym_at_kizoom.com>
Date: Sat, 08 Sep 2007 10:39:47 +0100

With XML as badly designed as the iTunes format appears to be, I would
say that JAXB isn't the tool of choice. I'd parse the XML using STAX
and manually populate a data structure.

You could proably convince JAXB to put that XML into a sensible
structure, but it's probably more trouble than it's worth.

kal stevens wrote:
> I am trying to map the itunes library export using jaxb (So I can not
> modify the xml)
>
> If there is documentation on how todo this a link would be helpful, but
> I could not find it
>
> I have 2 questions.
>
> The itunes format is as follows
>
> <key>Name</key><string>Audiobooks</string>
> <key>Playlist ID</key><integer>78</integer>
> <key>Playlist Persistent
> ID</key><string>1704C46B7B027F8A</string>
> <key>Visible</key><false/>
>
>
> How can I map the <key> tag to an enumeration.
> Can I populate a hashmap even if the xml is not in an xml format as follows
>
> <map>
> <entry>
> <key>a</key>
> <value>1</value>
> </entry>
> <entry>
> <key>b</key>
> <value>2</value>
>
> </entry>
> </map>
>
> (because I have no <entry> tag).
>
>