0

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.

4

1 回答 1

0

这是解决方案:

handler.startElement("media:group", {})
handler.addQuickElement(u"media:content", 'your content', media_dict_attrs)
handler.endElement("media:group")
于 2021-02-22T13:29:06.753 回答