def endtag(self, el):
self.write('</' + self.elname(el) + '>')
- def longtag(self, el):
+ def longtag(self, el, **extra):
self.starttag(el, **extra)
for ch in el.children:
self.node(ch)
def output(cls, out, el, *args, **kw):
cls(out=out, root=el, *args, **kw).start()
+ @classmethod
+ def fragment(cls, out, el, *args, **kw):
+ cls(out=out, root=el, *args, **kw).node(el)
+
def update(self, **ch):
ret = type(self).__new__(type(self))
ret.__dict__.update(self.__dict__)