I'm using the syndication feed framework to generate an MRSS feed. I was able to add a custom filed media:group inside the item element.
I'm looking how I can add media:content element inside media:group, here is the sample I would like to generate:
<item>
<media:group>
<media:content> 1 </media:content>
<media:content> 2 </media:content>
</media:group>
</item>
Thanks for any help.
Here is the solution:
handler.startElement("media:group", {})
handler.addQuickElement(u"media:content", 'your content', media_dict_attrs)
handler.endElement("media:group")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.