Public Member Functions | |
def | __getattr__ |
def | __getattr__ |
def | __getnewargs__ |
def | __getnewargs__ |
def | __new__ |
def | __new__ |
def | decodeGivenEventualEncoding |
def | decodeGivenEventualEncoding |
def | encode |
def | encode |
Definition at line 403 of file BeautifulSoup.py.
def BeautifulSoup::NavigableString::__getattr__ | ( | self, | |
attr | |||
) |
text.string gives you text. This is for backwards compatibility for Navigable*String, but for CData* it lets you get the string without the CData wrapper.
Definition at line 420 of file BeautifulSoup.py.
00421 : 00422 """text.string gives you text. This is for backwards 00423 compatibility for Navigable*String, but for CData* it lets you 00424 get the string without the CData wrapper.""" 00425 if attr == 'string': 00426 return self 00427 else: 00428 raise AttributeError, "'%s' object has no attribute '%s'" % (self.__class__.__name__, attr)
def BeautifulSoup::NavigableString::__getattr__ | ( | self, | |
attr | |||
) |
text.string gives you text. This is for backwards compatibility for Navigable*String, but for CData* it lets you get the string without the CData wrapper.
Definition at line 420 of file BeautifulSoup.py.
00421 : 00422 """text.string gives you text. This is for backwards 00423 compatibility for Navigable*String, but for CData* it lets you 00424 get the string without the CData wrapper.""" 00425 if attr == 'string': 00426 return self 00427 else: 00428 raise AttributeError, "'%s' object has no attribute '%s'" % (self.__class__.__name__, attr)
def BeautifulSoup::NavigableString::__getnewargs__ | ( | self | ) |
Definition at line 417 of file BeautifulSoup.py.
def BeautifulSoup::NavigableString::__getnewargs__ | ( | self | ) |
Definition at line 417 of file BeautifulSoup.py.
def BeautifulSoup::NavigableString::__new__ | ( | cls, | |
value | |||
) |
Create a new NavigableString. When unpickling a NavigableString, this method is called with the string in DEFAULT_OUTPUT_ENCODING. That encoding needs to be passed in to the superclass's __new__ or the superclass won't know how to handle non-ASCII characters.
Definition at line 405 of file BeautifulSoup.py.
00406 : 00407 """Create a new NavigableString. 00408 00409 When unpickling a NavigableString, this method is called with 00410 the string in DEFAULT_OUTPUT_ENCODING. That encoding needs to be 00411 passed in to the superclass's __new__ or the superclass won't know 00412 how to handle non-ASCII characters. 00413 """ 00414 if isinstance(value, unicode): 00415 return unicode.__new__(cls, value) 00416 return unicode.__new__(cls, value, DEFAULT_OUTPUT_ENCODING)
def BeautifulSoup::NavigableString::__new__ | ( | cls, | |
value | |||
) |
Create a new NavigableString. When unpickling a NavigableString, this method is called with the string in DEFAULT_OUTPUT_ENCODING. That encoding needs to be passed in to the superclass's __new__ or the superclass won't know how to handle non-ASCII characters.
Definition at line 405 of file BeautifulSoup.py.
00406 : 00407 """Create a new NavigableString. 00408 00409 When unpickling a NavigableString, this method is called with 00410 the string in DEFAULT_OUTPUT_ENCODING. That encoding needs to be 00411 passed in to the superclass's __new__ or the superclass won't know 00412 how to handle non-ASCII characters. 00413 """ 00414 if isinstance(value, unicode): 00415 return unicode.__new__(cls, value) 00416 return unicode.__new__(cls, value, DEFAULT_OUTPUT_ENCODING)
def BeautifulSoup::NavigableString::decodeGivenEventualEncoding | ( | self, | |
eventualEncoding | |||
) |
Reimplemented in BeautifulSoup::CData, BeautifulSoup::ProcessingInstruction, BeautifulSoup::Comment, BeautifulSoup::Declaration, BeautifulSoup::CData, BeautifulSoup::ProcessingInstruction, BeautifulSoup::Comment, and BeautifulSoup::Declaration.
Definition at line 432 of file BeautifulSoup.py.
def BeautifulSoup::NavigableString::decodeGivenEventualEncoding | ( | self, | |
eventualEncoding | |||
) |
Reimplemented in BeautifulSoup::CData, BeautifulSoup::ProcessingInstruction, BeautifulSoup::Comment, BeautifulSoup::Declaration, BeautifulSoup::CData, BeautifulSoup::ProcessingInstruction, BeautifulSoup::Comment, and BeautifulSoup::Declaration.
Definition at line 432 of file BeautifulSoup.py.
def BeautifulSoup::NavigableString::encode | ( | self, | |
encoding = DEFAULT_OUTPUT_ENCODING |
|||
) |
Definition at line 429 of file BeautifulSoup.py.
def BeautifulSoup::NavigableString::encode | ( | self, | |
encoding = DEFAULT_OUTPUT_ENCODING |
|||
) |
Definition at line 429 of file BeautifulSoup.py.