diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-26 20:57:51 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-26 20:57:51 -0500 |
commit | 1f4733fd1215411752c4d793d93edbc007fece12 (patch) | |
tree | ac9313b90f2fb5b0e93d5c1a4788c5a4ba0b523e /CHANGELOG | |
parent | 7db58f67d60bf2675613e38d2d8daeeadc5522db (diff) | |
parent | ef5770589595e80cbd9690b64504a2166b3558fd (diff) |
Emit an XML declaration when appropriate. I'm not totally happy with this, but it's good enough for now.
Diffstat (limited to 'CHANGELOG')
-rw-r--r-- | CHANGELOG | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -99,6 +99,21 @@ sections into ordinary text elements: In theory it's possible to preserve the CDATA sections when using the XML parser, but I don't see how to get it to work in practice. +== Miscellaneous other stuff == + +If the BeautifulSoup instance has .is_xml set to True, an appropriate +XML declaration will be emitted when the tree is transformed into a +string: + + <?xml version="1.0" encoding="utf-8"> + <markup> + ... + </markup> + +The ['lxml', 'xml'] tree builder sets .is_xml to True; the other tree +builders set it to False. If you want to parse XHTML with an HTML +parser, you can set it manually. + = 3.1.0 = A hybrid version that supports 2.4 and can be automatically converted |