+ def to_dict(self):
+ etree._namespace_map[str(self.RDF)] = 'rdf'
+ etree._namespace_map[str(self.DC)] = 'dc'
+
+ result = {'about': self.wiki_url}
+ for tag, (attribute, converter) in self.mapping.iteritems():
+ if hasattr(self, attribute):
+ result[attribute] = unicode(getattr(self, attribute))
+
+ return result
+