?
Current Path : /lib/python2.7/site-packages/pip/_vendor/html5lib/serializer/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //lib/python2.7/site-packages/pip/_vendor/html5lib/serializer/__init__.py |
from __future__ import absolute_import, division, unicode_literals from .. import treewalkers from .htmlserializer import HTMLSerializer def serialize(input, tree="etree", format="html", encoding=None, **serializer_opts): # XXX: Should we cache this? walker = treewalkers.getTreeWalker(tree) if format == "html": s = HTMLSerializer(**serializer_opts) else: raise ValueError("type must be html") return s.render(walker(input), encoding)