Package buildxml :: Package tools :: Module BeautifulSoup :: Class NavigableString
[hide private]
[frames] | no frames]

Class NavigableString

source code


Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(cls, value)
Create a new NavigableString.
source code
 
__getnewargs__(self) source code
 
__getattr__(self, attr)
text.string gives you text.
source code
 
__unicode__(self) source code
 
__str__(self, encoding=DEFAULT_OUTPUT_ENCODING)
str(x)
source code

Inherited from unicode: __add__, __contains__, __eq__, __format__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __hash__, __le__, __len__, __lt__, __mod__, __mul__, __ne__, __repr__, __rmod__, __rmul__, __sizeof__, capitalize, center, count, decode, encode, endswith, expandtabs, find, format, index, isalnum, isalpha, isdecimal, isdigit, islower, isnumeric, isspace, istitle, isupper, join, ljust, lower, lstrip, partition, replace, rfind, rindex, rjust, rpartition, rsplit, rstrip, split, splitlines, startswith, strip, swapcase, title, translate, upper, zfill

Inherited from unicode (private): _formatter_field_name_split, _formatter_parser

Inherited from PageElement: append, extract, fetchNextSiblings, fetchParents, fetchPrevious, fetchPreviousSiblings, findAllNext, findAllPrevious, findNext, findNextSibling, findNextSiblings, findParent, findParents, findPrevious, findPreviousSibling, findPreviousSiblings, insert, nextGenerator, nextSiblingGenerator, parentGenerator, previousGenerator, previousSiblingGenerator, replaceWith, replaceWithChildren, setup, substituteEncoding, toEncoding

Inherited from PageElement (private): _findAll, _findOne, _lastRecursiveChild

Inherited from object: __delattr__, __init__, __reduce__, __reduce_ex__, __setattr__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(cls, value)

source code 

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.

Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__getnewargs__(self)

source code 
Overrides: unicode.__getnewargs__

__getattr__(self, attr)
(Qualification operator)

source code 

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.

__str__(self, encoding=DEFAULT_OUTPUT_ENCODING)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)