(root, f,
# keyword arguments
encoding="us-ascii",
default_namespace=None)
| 178 | write(_escape_cdata(elem.tail, encoding)) |
| 179 | |
| 180 | def write_html(root, f, |
| 181 | # keyword arguments |
| 182 | encoding="us-ascii", |
| 183 | default_namespace=None): |
| 184 | assert root is not None |
| 185 | if not hasattr(f, "write"): |
| 186 | f = open(f, "wb") |
| 187 | write = f.write |
| 188 | if not encoding: |
| 189 | encoding = "us-ascii" |
| 190 | qnames, namespaces = _namespaces( |
| 191 | root, encoding, default_namespace |
| 192 | ) |
| 193 | _serialize_html( |
| 194 | write, root, encoding, qnames, namespaces |
| 195 | ) |
| 196 | |
| 197 | # -------------------------------------------------------------------- |
| 198 | # serialization support |
no test coverage detected