Re: [Simple-support] How to get info within just one tag
Brought to you by:
niallg
|
From: Warren G. <war...@so...> - 2012-02-22 16:04:39
|
Does it have anything to do with the element name being the same as the attribute name (youtube_feed) On Wed, Feb 22, 2012 at 9:49 AM, Gareth Murfin <gar...@gm...>wrote: > > Hi, > > Awesome tool, its working well apart from one issue, > > in my xml I have > > <youtube_feed> > http://gdata.youtube.com/feeds/api/playlists/CD1BZX438AFEAF2CCE68 > </youtube_feed> > > How do I get at this? > > If I make my class like this > > import org.simpleframework.xml.Element; > > @Element(name="youtube_feed") > public class YoutubeFeed { > > @Element(required=true) > public String youtube_feed; > > > } > > It complains of Error Occured Unable to satisfy > @org.simpleframework.xml.Element(data=false, name=, required=true, > type=void) on field 'youtube_feed' > > I can successfully get ones with more than one attribute within their own > tags, for example: > > > <rider_profiles> > <rider_profiles_feed> > http://www.blah.net > </rider_profiles_feed> > <rider_profiles_web> > http://www.blah.net > </rider_profiles_web> > <rider_profile_pdf> > http://www.blah.net > </rider_profile_pdf> > </rider_profiles> > > This works fine with my corresponding class: > > import org.simpleframework.xml.Element; > > @Element(name="rider_profiles") > public class RiderProfiles { > > @Element(required=true) > public String rider_profiles_feed; > > @Element(required=true) > public String rider_profiles_web; > > @Element(required=true) > public String rider_profile_pdf; > > } > > > > Any ideas? This looks like a real time saving lib and so I really love it > so far :-) > Gaz. > > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > > -- *Warren Goldman* Consultant | Solution Design Group (SDG) | 10275 Wayzata Blvd. Suite 300 | Minnetonka, MN 55305 952.454.2154 (mobile) | 763.5956346 (office) | www.solutiondesign.com Minneapolis/St. Paul Business Journal's Best Places to Work and Fast 50 |