Hi,
> I would like to render just a fragment of xhtml. I would like to parse
> the wiki text, then just render the summary, without the header and
> containing tags. I have managed to use mwlib.xhtmlwriter.MWXHTMLWriter
> but there is no way to prevent it adding the html, head, css and body
> tags as they're all done in the constructor. Is there an alternative
> for just rendering fragments?
why not just inherit ?
something like this should do it (untested):
class YourWriter(MWXHTMLWriter):
header = ""
css = ""
def __init__(self, **kargs):
MWXHTMLWriter.__init__(self, **kargs)
self.root = self.xmlbody = ET.Element("div")
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"mwlib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mwlib?hl=en
-~----------~----~----~----~------~----~------~--~---