From a860302f892294d43d509d4b47c07623f44be947 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sat, 6 May 2017 21:38:56 -0400 Subject: Replace get_attribute_text with get_attribute_list. --- doc/source/index.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/source') diff --git a/doc/source/index.rst b/doc/source/index.rst index 7bee329..e1b73aa 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -428,11 +428,11 @@ consolidated:: print(rel_soup.p) #

Back to the homepage

-You can use ```get_attribute_text`` to get the value of any attribute as a -string, whether or not it's a multi-valued atribute:: +You can use ```get_attribute_list`` to get a value that's always a list, +string, whether or not it's a multi-valued atribute - css_soup.p.get_attribute_text('class') - # "body strikeout" + id_soup.p.get_attribute_list('id') + # ["my id"] If you parse a document as XML, there are no multi-valued attributes:: -- cgit v1.2.3