diff options
Diffstat (limited to 'bs4/__init__.py')
-rw-r--r-- | bs4/__init__.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bs4/__init__.py b/bs4/__init__.py index 7a36493..c66cc65 100644 --- a/bs4/__init__.py +++ b/bs4/__init__.py @@ -329,6 +329,16 @@ class BeautifulSoup(Tag): return prefix + super(BeautifulSoup, self).decode( indent_level, eventual_encoding, formatter) +class BeautifulStoneSoup(BeautifulSoup): + """Deprecated interface to an XML parser.""" + + def __init__(self, *args, **kwargs): + kwargs['features'] = 'xml' + warnings.warn( + 'The BeautifulStoneSoup class is deprecated. Instead of using ' + 'it, pass features="xml" into the BeautifulSoup constructor.') + super(BeautifulStoneSoup, self).__init__(*args, **kwargs) + class StopParsing(Exception): pass |