nick
nick

Reputation: 31

Django MRSS add item into item - using syndication feed framework

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.

Upvotes: 0

Views: 129

Answers (1)

nick
nick

Reputation: 31

Here is the solution:

handler.startElement("media:group", {})
handler.addQuickElement(u"media:content", 'your content', media_dict_attrs)
handler.endElement("media:group")

Upvotes: 1

Related Questions