def AnalyticsDataFeedFromString(xml_string):
 feed = atom.CreateClassFromXMLString(AnalyticsDataFeed, xml_string)
 if feed.entry:
  for entry in feed.entry:
   for met in entry.metric:
    entry.__dict__[met.name.replace('ga:', '')] = met
   if (entry.dimension is not None):
    for dim in entry.dimension:
     entry.__dict__[dim.name.replace('ga:', '')] = dim
 return feed

def AnalyticsDataFeedFromString ( xml_string ) : feed = atom . CreateClassFromXMLString ( AnalyticsDataFeed , xml_string ) if feed . entry : for entry in feed . entry : for met in entry . metric : entry . __dict__ [ met . name . replace ( 'ga:' , '' ) ] = met if ( entry . dimension is not None ) : for dim in entry . dimension : entry . __dict__ [ dim . name . replace ( 'ga:' , '' ) ] = dim return feed
converts an xml string into an accountlistfeed object .