CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
BeautifulSoup.NavigableString Class Reference
Inheritance diagram for BeautifulSoup.NavigableString:
BeautifulSoup.PageElement BeautifulSoup.PageElement BeautifulSoup.CData BeautifulSoup.CData BeautifulSoup.Comment BeautifulSoup.Comment BeautifulSoup.Declaration BeautifulSoup.Declaration BeautifulSoup.ProcessingInstruction BeautifulSoup.ProcessingInstruction

Public Member Functions

def __getattr__
 
def __getattr__
 
def __getnewargs__
 
def __getnewargs__
 
def __new__
 
def __new__
 
def decodeGivenEventualEncoding
 
def decodeGivenEventualEncoding
 
def encode
 
def encode
 
- Public Member Functions inherited from BeautifulSoup.PageElement
def append
 
def append
 
def extract
 
def extract
 
def findAllNext
 
def findAllNext
 
def findAllPrevious
 
def findAllPrevious
 
def findNext
 
def findNext
 
def findNextSibling
 
def findNextSibling
 
def findNextSiblings
 
def findNextSiblings
 
def findParent
 
def findParent
 
def findParents
 
def findParents
 
def findPrevious
 
def findPrevious
 
def findPreviousSibling
 
def findPreviousSibling
 
def findPreviousSiblings
 
def findPreviousSiblings
 
def insert
 
def insert
 
def nextGenerator
 
def nextGenerator
 
def nextSiblingGenerator
 
def nextSiblingGenerator
 
def parentGenerator
 
def parentGenerator
 
def previousGenerator
 
def previousGenerator
 
def previousSiblingGenerator
 
def previousSiblingGenerator
 
def replaceWith
 
def replaceWith
 
def setup
 
def setup
 
def substituteEncoding
 
def substituteEncoding
 
def toEncoding
 
def toEncoding
 

Additional Inherited Members

- Public Attributes inherited from BeautifulSoup.PageElement
 next
 
 nextSibling
 
 parent
 
 previous
 
 previousSibling
 
- Static Public Attributes inherited from BeautifulSoup.PageElement
 fetchNextSiblings = findNextSiblings
 
 fetchParents = findParents
 
 fetchPrevious = findAllPrevious
 
 fetchPreviousSiblings = findPreviousSiblings
 

Detailed Description

Definition at line 403 of file BeautifulSoup.py.

Member Function Documentation

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.

Referenced by BeautifulSoup.NavigableString.__getattr__(), and VarParsing.VarParsing.setType().

421  def __getattr__(self, attr):
422  """text.string gives you text. This is for backwards
423  compatibility for Navigable*String, but for CData* it lets you
424  get the string without the CData wrapper."""
425  if attr == 'string':
426  return self
427  else:
428  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.

References BeautifulSoup.NavigableString.__getattr__().

Referenced by VarParsing.VarParsing.setType().

421  def __getattr__(self, attr):
422  """text.string gives you text. This is for backwards
423  compatibility for Navigable*String, but for CData* it lets you
424  get the string without the CData wrapper."""
425  if attr == 'string':
426  return self
427  else:
428  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.

Referenced by BeautifulSoup.NavigableString.__getnewargs__().

418  def __getnewargs__(self):
419  return (unicode(self),)
def BeautifulSoup.NavigableString.__getnewargs__ (   self)

Definition at line 417 of file BeautifulSoup.py.

References BeautifulSoup.NavigableString.__getnewargs__().

418  def __getnewargs__(self):
419  return (unicode(self),)
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.

Referenced by BeautifulSoup.NavigableString.__new__(), and SequenceTypes._ModuleSequenceType.copyAndExclude().

406  def __new__(cls, value):
407  """Create a new NavigableString.
408 
409  When unpickling a NavigableString, this method is called with
410  the string in DEFAULT_OUTPUT_ENCODING. That encoding needs to be
411  passed in to the superclass's __new__ or the superclass won't know
412  how to handle non-ASCII characters.
413  """
414  if isinstance(value, unicode):
415  return unicode.__new__(cls, value)
416  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.

References BeautifulSoup.NavigableString.__new__().

Referenced by SequenceTypes._ModuleSequenceType.copyAndExclude().

406  def __new__(cls, value):
407  """Create a new NavigableString.
408 
409  When unpickling a NavigableString, this method is called with
410  the string in DEFAULT_OUTPUT_ENCODING. That encoding needs to be
411  passed in to the superclass's __new__ or the superclass won't know
412  how to handle non-ASCII characters.
413  """
414  if isinstance(value, unicode):
415  return unicode.__new__(cls, value)
416  return unicode.__new__(cls, value, DEFAULT_OUTPUT_ENCODING)
def BeautifulSoup.NavigableString.decodeGivenEventualEncoding (   self,
  eventualEncoding 
)

Definition at line 432 of file BeautifulSoup.py.

Referenced by BeautifulSoup.NavigableString.decodeGivenEventualEncoding().

433  def decodeGivenEventualEncoding(self, eventualEncoding):
434  return self
def BeautifulSoup.NavigableString.decodeGivenEventualEncoding (   self,
  eventualEncoding 
)

Definition at line 432 of file BeautifulSoup.py.

References BeautifulSoup.NavigableString.decodeGivenEventualEncoding().

433  def decodeGivenEventualEncoding(self, eventualEncoding):
434  return self
def BeautifulSoup.NavigableString.encode (   self,
  encoding = DEFAULT_OUTPUT_ENCODING 
)

Definition at line 429 of file BeautifulSoup.py.

References DTNumberingScheme.decode(), ESElectronicsSim.decode(), HLTrigReport.decode(), mySiStripNoises.decode(), EcalDumpRaw.decode(), DTPosNegType.decode(), DTPosNeg.decode(), SiStripBadStrip.decode(), SiStripNoises.decode(), and SiStripPedestals.decode().

Referenced by BeautifulSoup.Tag._invert(), and BeautifulSoup.NavigableString.encode().

430  def encode(self, encoding=DEFAULT_OUTPUT_ENCODING):
431  return self.decode().encode(encoding)
def BeautifulSoup.NavigableString.encode (   self,
  encoding = DEFAULT_OUTPUT_ENCODING 
)

Definition at line 429 of file BeautifulSoup.py.

References DTNumberingScheme.decode(), ESElectronicsSim.decode(), HLTrigReport.decode(), mySiStripNoises.decode(), EcalDumpRaw.decode(), DTPosNegType.decode(), DTPosNeg.decode(), SiStripBadStrip.decode(), SiStripNoises.decode(), SiStripPedestals.decode(), and BeautifulSoup.NavigableString.encode().

Referenced by BeautifulSoup.Tag._invert().

430  def encode(self, encoding=DEFAULT_OUTPUT_ENCODING):
431  return self.decode().encode(encoding)