diff options
author | Leonard Richardson <leonardr@segfault.org> | 2021-11-29 22:13:33 -0500 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2021-11-29 22:13:33 -0500 |
commit | ad52722cc6b55ce414d395e9a0860cee57c0ab2d (patch) | |
tree | 8ff820b41d9ee5fb1f896629782270349cd8311b /doc/source | |
parent | c005e9ba28b4eec3a5fab173b928609bc692dd51 (diff) |
Do a better job of keeping track of namespaces as an XML document is
parsed, so that CSS selectors that use namespaces will do the right
thing more often. [bug=1946243]
Diffstat (limited to 'doc/source')
-rw-r--r-- | doc/source/index.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/source/index.rst b/doc/source/index.rst index 67d3648..d81fccd 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1800,9 +1800,9 @@ selectors.:: # [<ns1:child>I'm in namespace 1</ns1:child>] When handling a CSS selector that uses namespaces, Beautiful Soup -uses the namespace abbreviations it found when parsing the -document. You can override this by passing in your own dictionary of -abbreviations:: +always tries to use namespace prefixes that make sense based on what +it saw while parsing the document. You can always provide your own +dictionary of abbreviations:: namespaces = dict(first="http://namespace1/", second="http://namespace2/") soup.select("second|child", namespaces=namespaces) |