CMS 3D CMS Logo

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

Public Member Functions

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
 

Public Attributes

 next
 
 nextSibling
 
 parent
 
 previous
 
 previousSibling
 

Static Public Attributes

 fetchNextSiblings = findNextSiblings
 
 fetchParents = findParents
 
 fetchPrevious = findAllPrevious
 
 fetchPreviousSiblings = findPreviousSiblings
 

Private Member Functions

def _findAll
 
def _findAll
 
def _findOne
 
def _findOne
 
def _lastRecursiveChild
 
def _lastRecursiveChild
 

Detailed Description

Contains the navigational information for some part of the page
(either a tag or a piece of text)

Definition at line 114 of file BeautifulSoup.py.

Member Function Documentation

def BeautifulSoup.PageElement._findAll (   self,
  name,
  attrs,
  text,
  limit,
  generator,
  kwargs 
)
private

Definition at line 325 of file BeautifulSoup.py.

References python.IdGenerator.generator.

Referenced by BeautifulSoup.PageElement._findAll(), BeautifulSoup.Tag._invert(), BeautifulSoup.PageElement.findAllNext(), BeautifulSoup.PageElement.findAllPrevious(), BeautifulSoup.PageElement.findNextSiblings(), BeautifulSoup.PageElement.findParents(), and BeautifulSoup.PageElement.findPreviousSiblings().

326  def _findAll(self, name, attrs, text, limit, generator, **kwargs):
327  "Iterates over a generator looking for things that match."
328 
329  if isinstance(name, SoupStrainer):
330  strainer = name
331  else:
332  # Build a SoupStrainer
333  strainer = SoupStrainer(name, attrs, text, **kwargs)
334  results = ResultSet(strainer)
335  g = generator()
336  while True:
337  try:
338  i = g.next()
339  except StopIteration:
340  break
341  if i:
342  found = strainer.search(i)
343  if found:
344  results.append(found)
345  if limit and len(results) >= limit:
346  break
347  return results
def BeautifulSoup.PageElement._findAll (   self,
  name,
  attrs,
  text,
  limit,
  generator,
  kwargs 
)
private

Definition at line 325 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findAll(), and python.IdGenerator.generator.

326  def _findAll(self, name, attrs, text, limit, generator, **kwargs):
327  "Iterates over a generator looking for things that match."
328 
329  if isinstance(name, SoupStrainer):
330  strainer = name
331  else:
332  # Build a SoupStrainer
333  strainer = SoupStrainer(name, attrs, text, **kwargs)
334  results = ResultSet(strainer)
335  g = generator()
336  while True:
337  try:
338  i = g.next()
339  except StopIteration:
340  break
341  if i:
342  found = strainer.search(i)
343  if found:
344  results.append(found)
345  if limit and len(results) >= limit:
346  break
347  return results
def BeautifulSoup.PageElement._findOne (   self,
  method,
  name,
  attrs,
  text,
  kwargs 
)
private

Definition at line 318 of file BeautifulSoup.py.

References PFRecoTauDiscriminationAgainstElectronMVA2_cfi.method.

Referenced by BeautifulSoup.PageElement._findOne(), BeautifulSoup.PageElement.findNext(), BeautifulSoup.PageElement.findNextSibling(), BeautifulSoup.PageElement.findPrevious(), and BeautifulSoup.PageElement.findPreviousSibling().

319  def _findOne(self, method, name, attrs, text, **kwargs):
320  r = None
321  l = method(name, attrs, text, 1, **kwargs)
322  if l:
323  r = l[0]
324  return r
def BeautifulSoup.PageElement._findOne (   self,
  method,
  name,
  attrs,
  text,
  kwargs 
)
private

Definition at line 318 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findOne(), and PFRecoTauDiscriminationAgainstElectronMVA2_cfi.method.

319  def _findOne(self, method, name, attrs, text, **kwargs):
320  r = None
321  l = method(name, attrs, text, 1, **kwargs)
322  if l:
323  r = l[0]
324  return r
def BeautifulSoup.PageElement._lastRecursiveChild (   self)
private

Definition at line 173 of file BeautifulSoup.py.

Referenced by BeautifulSoup.Tag._invert(), BeautifulSoup.PageElement._lastRecursiveChild(), and BeautifulSoup.PageElement.extract().

174  def _lastRecursiveChild(self):
175  "Finds the last element beneath this object to be parsed."
176  lastChild = self
177  while hasattr(lastChild, 'contents') and lastChild.contents:
178  lastChild = lastChild.contents[-1]
179  return lastChild
def BeautifulSoup.PageElement._lastRecursiveChild (   self)
private

Definition at line 173 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._lastRecursiveChild().

174  def _lastRecursiveChild(self):
175  "Finds the last element beneath this object to be parsed."
176  lastChild = self
177  while hasattr(lastChild, 'contents') and lastChild.contents:
178  lastChild = lastChild.contents[-1]
179  return lastChild
def BeautifulSoup.PageElement.append (   self,
  tag 
)
Appends the given tag to the contents of this tag.

Definition at line 240 of file BeautifulSoup.py.

References L1GctProcessor::Pipeline< T >.contents, dqm_interfaces.DirFetcher.contents, BinningPointByMap.insert(), DDMapper< KeyType, ValueType >.insert(), TSinglePedEntry.insert(), ESCondObjectContainer< T >.insert(), RecoIdealGeometry.insert(), EcalContainer< DetId, T >.insert(), TPedValues.insert(), ShallowDigisProducer.insert(), edm::OneToValue< CKey, Val, index >.insert(), EcalCondObjectContainer< T >.insert(), edm::OneToMany< CKey, CVal, index >.insert(), edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >.insert(), EcalCondTowerObjectContainer< T >.insert(), edm::OneToManyWithQualityGeneric< CKey, CVal, Q, index, KeyRefProd, ValRefProd, KeyRef, ValRef >.insert(), reco::CATopJetTagInfo.insert(), DTBufferTree< Key, Content >.insert(), edm::helper::Filler< Map >.insert(), reco::JetTrackMatch< JetC >.insert(), edm::IDVectorMap< ID, C, P >.insert(), edm::AssociationMap< Tag >.insert(), cond::IOVEditor.insert(), ora::Container.insert(), edm::helper::IndexRangeAssociation::FastFiller.insert(), ora::Database.insert(), python.seqvaluedict.seqdict.insert(), reco::SoftLeptonTagInfo.insert(), edm::DetSetVector< T >.insert(), edm::ProductHolderIndexHelper.insert(), reco::TaggingVariableList.insert(), BeautifulSoup.PageElement.insert(), edm::Trie< T >.insert(), and edmNew::DetSetVector< T >.insert().

Referenced by Vispa.Views.PropertyView.PropertyView.addProperty(), and BeautifulSoup.PageElement.append().

241  def append(self, tag):
242  """Appends the given tag to the contents of this tag."""
243  self.insert(len(self.contents), tag)
def BeautifulSoup.PageElement.append (   self,
  tag 
)
Appends the given tag to the contents of this tag.

Definition at line 240 of file BeautifulSoup.py.

References BeautifulSoup.PageElement.append(), L1GctProcessor::Pipeline< T >.contents, dqm_interfaces.DirFetcher.contents, BinningPointByMap.insert(), DDMapper< KeyType, ValueType >.insert(), TSinglePedEntry.insert(), ESCondObjectContainer< T >.insert(), EcalContainer< DetId, T >.insert(), RecoIdealGeometry.insert(), TPedValues.insert(), ShallowDigisProducer.insert(), edm::OneToValue< CKey, Val, index >.insert(), EcalCondObjectContainer< T >.insert(), edm::OneToMany< CKey, CVal, index >.insert(), edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >.insert(), EcalCondTowerObjectContainer< T >.insert(), edm::OneToManyWithQualityGeneric< CKey, CVal, Q, index, KeyRefProd, ValRefProd, KeyRef, ValRef >.insert(), reco::CATopJetTagInfo.insert(), DTBufferTree< Key, Content >.insert(), edm::helper::Filler< Map >.insert(), reco::JetTrackMatch< JetC >.insert(), edm::IDVectorMap< ID, C, P >.insert(), edm::AssociationMap< Tag >.insert(), cond::IOVEditor.insert(), ora::Container.insert(), edm::helper::IndexRangeAssociation::FastFiller.insert(), ora::Database.insert(), python.seqvaluedict.seqdict.insert(), reco::SoftLeptonTagInfo.insert(), edm::DetSetVector< T >.insert(), edm::ProductHolderIndexHelper.insert(), reco::TaggingVariableList.insert(), BeautifulSoup.PageElement.insert(), edm::Trie< T >.insert(), and edmNew::DetSetVector< T >.insert().

Referenced by Vispa.Views.PropertyView.PropertyView.addProperty().

241  def append(self, tag):
242  """Appends the given tag to the contents of this tag."""
243  self.insert(len(self.contents), tag)
def BeautifulSoup.PageElement.extract (   self)
Destructively rips this element out of the tree.

Definition at line 144 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._lastRecursiveChild(), BeautifulSoup.PageElement.nextSibling, python.multivaluedict.MyUserList.parent, BeautifulSoup.PageElement.parent, BeautifulSoup.PageElement.previous, and BeautifulSoup.PageElement.previousSibling.

Referenced by BeautifulSoup.Tag._invert(), BeautifulSoup.PageElement.extract(), and BeautifulSoup.PageElement.replaceWith().

145  def extract(self):
146  """Destructively rips this element out of the tree."""
147  if self.parent:
148  try:
149  self.parent.contents.remove(self)
150  except ValueError:
151  pass
152 
153  #Find the two elements that would be next to each other if
154  #this element (and any children) hadn't been parsed. Connect
155  #the two.
156  lastChild = self._lastRecursiveChild()
157  nextElement = lastChild.next
158 
159  if self.previous:
160  self.previous.next = nextElement
161  if nextElement:
162  nextElement.previous = self.previous
163  self.previous = None
164  lastChild.next = None
165 
166  self.parent = None
167  if self.previousSibling:
168  self.previousSibling.nextSibling = self.nextSibling
169  if self.nextSibling:
170  self.nextSibling.previousSibling = self.previousSibling
171  self.previousSibling = self.nextSibling = None
172  return self
def BeautifulSoup.PageElement.extract (   self)
Destructively rips this element out of the tree.

Definition at line 144 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._lastRecursiveChild(), BeautifulSoup.PageElement.extract(), BeautifulSoup.PageElement.nextSibling, python.multivaluedict.MyUserList.parent, BeautifulSoup.PageElement.parent, BeautifulSoup.PageElement.previous, and BeautifulSoup.PageElement.previousSibling.

145  def extract(self):
146  """Destructively rips this element out of the tree."""
147  if self.parent:
148  try:
149  self.parent.contents.remove(self)
150  except ValueError:
151  pass
152 
153  #Find the two elements that would be next to each other if
154  #this element (and any children) hadn't been parsed. Connect
155  #the two.
156  lastChild = self._lastRecursiveChild()
157  nextElement = lastChild.next
158 
159  if self.previous:
160  self.previous.next = nextElement
161  if nextElement:
162  nextElement.previous = self.previous
163  self.previous = None
164  lastChild.next = None
165 
166  self.parent = None
167  if self.previousSibling:
168  self.previousSibling.nextSibling = self.nextSibling
169  if self.nextSibling:
170  self.nextSibling.previousSibling = self.previousSibling
171  self.previousSibling = self.nextSibling = None
172  return self
def BeautifulSoup.PageElement.findAllNext (   self,
  name = None,
  attrs = {},
  text = None,
  limit = None,
  kwargs 
)
Returns all items that match the given criteria and appear
after this Tag in the document.

Definition at line 250 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findAll(), and BeautifulSoup.PageElement.nextGenerator().

Referenced by BeautifulSoup.PageElement.findNext().

251  **kwargs):
252  """Returns all items that match the given criteria and appear
253  after this Tag in the document."""
254  return self._findAll(name, attrs, text, limit, self.nextGenerator,
255  **kwargs)
def BeautifulSoup.PageElement.findAllNext (   self,
  name = None,
  attrs = {},
  text = None,
  limit = None,
  kwargs 
)
Returns all items that match the given criteria and appear
after this Tag in the document.

Definition at line 250 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findAll(), and BeautifulSoup.PageElement.nextGenerator().

251  **kwargs):
252  """Returns all items that match the given criteria and appear
253  after this Tag in the document."""
254  return self._findAll(name, attrs, text, limit, self.nextGenerator,
255  **kwargs)
def BeautifulSoup.PageElement.findAllPrevious (   self,
  name = None,
  attrs = {},
  text = None,
  limit = None,
  kwargs 
)
Returns all items that match the given criteria and appear
before this Tag in the document.

Definition at line 276 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findAll(), and BeautifulSoup.PageElement.previousGenerator().

277  **kwargs):
278  """Returns all items that match the given criteria and appear
279  before this Tag in the document."""
280  return self._findAll(name, attrs, text, limit, self.previousGenerator,
**kwargs)
def BeautifulSoup.PageElement.findAllPrevious (   self,
  name = None,
  attrs = {},
  text = None,
  limit = None,
  kwargs 
)
Returns all items that match the given criteria and appear
before this Tag in the document.

Definition at line 276 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findAll(), and BeautifulSoup.PageElement.previousGenerator().

Referenced by BeautifulSoup.PageElement.findPrevious().

277  **kwargs):
278  """Returns all items that match the given criteria and appear
279  before this Tag in the document."""
280  return self._findAll(name, attrs, text, limit, self.previousGenerator,
**kwargs)
def BeautifulSoup.PageElement.findNext (   self,
  name = None,
  attrs = {},
  text = None,
  kwargs 
)
Returns the first item that matches the given criteria and
appears after this Tag in the document.

Definition at line 244 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findOne(), BeautifulSoup.PageElement.findAllNext(), and BeautifulSoup.PageElement.findNext().

245  def findNext(self, name=None, attrs={}, text=None, **kwargs):
246  """Returns the first item that matches the given criteria and
247  appears after this Tag in the document."""
248  return self._findOne(self.findAllNext, name, attrs, text, **kwargs)
def BeautifulSoup.PageElement.findNext (   self,
  name = None,
  attrs = {},
  text = None,
  kwargs 
)
Returns the first item that matches the given criteria and
appears after this Tag in the document.

Definition at line 244 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findOne(), and BeautifulSoup.PageElement.findAllNext().

Referenced by BeautifulSoup.PageElement.findNext().

245  def findNext(self, name=None, attrs={}, text=None, **kwargs):
246  """Returns the first item that matches the given criteria and
247  appears after this Tag in the document."""
248  return self._findOne(self.findAllNext, name, attrs, text, **kwargs)
def BeautifulSoup.PageElement.findNextSibling (   self,
  name = None,
  attrs = {},
  text = None,
  kwargs 
)
Returns the closest sibling to this Tag that matches the
given criteria and appears after this Tag in the document.

Definition at line 256 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findOne(), BeautifulSoup.PageElement.findNextSibling(), and BeautifulSoup.PageElement.findNextSiblings().

257  def findNextSibling(self, name=None, attrs={}, text=None, **kwargs):
258  """Returns the closest sibling to this Tag that matches the
259  given criteria and appears after this Tag in the document."""
260  return self._findOne(self.findNextSiblings, name, attrs, text,
261  **kwargs)
def BeautifulSoup.PageElement.findNextSibling (   self,
  name = None,
  attrs = {},
  text = None,
  kwargs 
)
Returns the closest sibling to this Tag that matches the
given criteria and appears after this Tag in the document.

Definition at line 256 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findOne(), and BeautifulSoup.PageElement.findNextSiblings().

Referenced by BeautifulSoup.PageElement.findNextSibling().

257  def findNextSibling(self, name=None, attrs={}, text=None, **kwargs):
258  """Returns the closest sibling to this Tag that matches the
259  given criteria and appears after this Tag in the document."""
260  return self._findOne(self.findNextSiblings, name, attrs, text,
261  **kwargs)
def BeautifulSoup.PageElement.findNextSiblings (   self,
  name = None,
  attrs = {},
  text = None,
  limit = None,
  kwargs 
)
Returns the siblings of this Tag that match the given
criteria and appear after this Tag in the document.

Definition at line 263 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findAll(), and BeautifulSoup.PageElement.nextSiblingGenerator().

264  **kwargs):
265  """Returns the siblings of this Tag that match the given
266  criteria and appear after this Tag in the document."""
267  return self._findAll(name, attrs, text, limit,
self.nextSiblingGenerator, **kwargs)
def BeautifulSoup.PageElement.findNextSiblings (   self,
  name = None,
  attrs = {},
  text = None,
  limit = None,
  kwargs 
)
Returns the siblings of this Tag that match the given
criteria and appear after this Tag in the document.

Definition at line 263 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findAll(), and BeautifulSoup.PageElement.nextSiblingGenerator().

Referenced by BeautifulSoup.PageElement.findNextSibling().

264  **kwargs):
265  """Returns the siblings of this Tag that match the given
266  criteria and appear after this Tag in the document."""
267  return self._findAll(name, attrs, text, limit,
self.nextSiblingGenerator, **kwargs)
def BeautifulSoup.PageElement.findParent (   self,
  name = None,
  attrs = {},
  kwargs 
)
Returns the closest parent of this Tag that matches the given
criteria.

Definition at line 297 of file BeautifulSoup.py.

References BeautifulSoup.PageElement.findParent(), and BeautifulSoup.PageElement.findParents().

298  def findParent(self, name=None, attrs={}, **kwargs):
299  """Returns the closest parent of this Tag that matches the given
300  criteria."""
301  # NOTE: We can't use _findOne because findParents takes a different
302  # set of arguments.
303  r = None
304  l = self.findParents(name, attrs, 1)
305  if l:
306  r = l[0]
307  return r
def BeautifulSoup.PageElement.findParent (   self,
  name = None,
  attrs = {},
  kwargs 
)
Returns the closest parent of this Tag that matches the given
criteria.

Definition at line 297 of file BeautifulSoup.py.

References BeautifulSoup.PageElement.findParents().

Referenced by BeautifulSoup.PageElement.findParent().

298  def findParent(self, name=None, attrs={}, **kwargs):
299  """Returns the closest parent of this Tag that matches the given
300  criteria."""
301  # NOTE: We can't use _findOne because findParents takes a different
302  # set of arguments.
303  r = None
304  l = self.findParents(name, attrs, 1)
305  if l:
306  r = l[0]
307  return r
def BeautifulSoup.PageElement.findParents (   self,
  name = None,
  attrs = {},
  limit = None,
  kwargs 
)
Returns the parents of this Tag that match the given
criteria.

Definition at line 308 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findAll(), and BeautifulSoup.PageElement.parentGenerator().

Referenced by BeautifulSoup.PageElement.findParent(), and BeautifulSoup.PageElement.findParents().

309  def findParents(self, name=None, attrs={}, limit=None, **kwargs):
310  """Returns the parents of this Tag that match the given
311  criteria."""
312 
313  return self._findAll(name, attrs, None, limit, self.parentGenerator,
**kwargs)
def BeautifulSoup.PageElement.findParents (   self,
  name = None,
  attrs = {},
  limit = None,
  kwargs 
)
Returns the parents of this Tag that match the given
criteria.

Definition at line 308 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findAll(), BeautifulSoup.PageElement.findParents(), and BeautifulSoup.PageElement.parentGenerator().

309  def findParents(self, name=None, attrs={}, limit=None, **kwargs):
310  """Returns the parents of this Tag that match the given
311  criteria."""
312 
313  return self._findAll(name, attrs, None, limit, self.parentGenerator,
**kwargs)
def BeautifulSoup.PageElement.findPrevious (   self,
  name = None,
  attrs = {},
  text = None,
  kwargs 
)
Returns the first item that matches the given criteria and
appears before this Tag in the document.

Definition at line 270 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findOne(), BeautifulSoup.PageElement.findAllPrevious(), and BeautifulSoup.PageElement.findPrevious().

271  def findPrevious(self, name=None, attrs={}, text=None, **kwargs):
272  """Returns the first item that matches the given criteria and
273  appears before this Tag in the document."""
274  return self._findOne(self.findAllPrevious, name, attrs, text, **kwargs)
def BeautifulSoup.PageElement.findPrevious (   self,
  name = None,
  attrs = {},
  text = None,
  kwargs 
)
Returns the first item that matches the given criteria and
appears before this Tag in the document.

Definition at line 270 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findOne(), and BeautifulSoup.PageElement.findAllPrevious().

Referenced by BeautifulSoup.PageElement.findPrevious().

271  def findPrevious(self, name=None, attrs={}, text=None, **kwargs):
272  """Returns the first item that matches the given criteria and
273  appears before this Tag in the document."""
274  return self._findOne(self.findAllPrevious, name, attrs, text, **kwargs)
def BeautifulSoup.PageElement.findPreviousSibling (   self,
  name = None,
  attrs = {},
  text = None,
  kwargs 
)
Returns the closest sibling to this Tag that matches the
given criteria and appears before this Tag in the document.

Definition at line 283 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findOne(), BeautifulSoup.PageElement.findPreviousSibling(), and BeautifulSoup.PageElement.findPreviousSiblings().

284  def findPreviousSibling(self, name=None, attrs={}, text=None, **kwargs):
285  """Returns the closest sibling to this Tag that matches the
286  given criteria and appears before this Tag in the document."""
287  return self._findOne(self.findPreviousSiblings, name, attrs, text,
288  **kwargs)
def BeautifulSoup.PageElement.findPreviousSibling (   self,
  name = None,
  attrs = {},
  text = None,
  kwargs 
)
Returns the closest sibling to this Tag that matches the
given criteria and appears before this Tag in the document.

Definition at line 283 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findOne(), and BeautifulSoup.PageElement.findPreviousSiblings().

Referenced by BeautifulSoup.PageElement.findPreviousSibling().

284  def findPreviousSibling(self, name=None, attrs={}, text=None, **kwargs):
285  """Returns the closest sibling to this Tag that matches the
286  given criteria and appears before this Tag in the document."""
287  return self._findOne(self.findPreviousSiblings, name, attrs, text,
288  **kwargs)
def BeautifulSoup.PageElement.findPreviousSiblings (   self,
  name = None,
  attrs = {},
  text = None,
  limit = None,
  kwargs 
)
Returns the siblings of this Tag that match the given
criteria and appear before this Tag in the document.

Definition at line 290 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findAll(), and BeautifulSoup.PageElement.previousSiblingGenerator().

291  limit=None, **kwargs):
292  """Returns the siblings of this Tag that match the given
293  criteria and appear before this Tag in the document."""
294  return self._findAll(name, attrs, text, limit,
self.previousSiblingGenerator, **kwargs)
def BeautifulSoup.PageElement.findPreviousSiblings (   self,
  name = None,
  attrs = {},
  text = None,
  limit = None,
  kwargs 
)
Returns the siblings of this Tag that match the given
criteria and appear before this Tag in the document.

Definition at line 290 of file BeautifulSoup.py.

References BeautifulSoup.PageElement._findAll(), and BeautifulSoup.PageElement.previousSiblingGenerator().

Referenced by BeautifulSoup.PageElement.findPreviousSibling().

291  limit=None, **kwargs):
292  """Returns the siblings of this Tag that match the given
293  criteria and appear before this Tag in the document."""
294  return self._findAll(name, attrs, text, limit,
self.previousSiblingGenerator, **kwargs)
def BeautifulSoup.PageElement.insert (   self,
  position,
  newChild 
)

Definition at line 180 of file BeautifulSoup.py.

References L1GctProcessor::Pipeline< T >.contents, dqm_interfaces.DirFetcher.contents, CaloRecHitMetaCollectionItem.find(), SimpleCaloRecHitMetaCollection< C >.find(), CaloRecHitMetaCollectionItemT< T >.find(), PhysicsTools::MVATrainerContainer.find(), Overlayer.find(), ElectronMCTruthFinder.find(), PizeroMCTruthFinder.find(), CaloRecHitMetaCollection.find(), PhysicsTools::SourceVariableSet.find(), StringMap.find(), pos::PixelConfig.find(), ThePEG::ProxyBase.find(), PhotonMCTruthFinder.find(), edm::ActionTable.find(), CaloRecHitMetaCollectionFast.find(), ora::PoolDbCache.find(), AlignSetup< Alignables >.find(), AlignSetup< Type >.find(), AlignSetup< align::Alignables >.find(), ESCondObjectContainer< T >.find(), ThePEG::Proxy< Proxy >.find(), ThePEG::Proxy< T >.find(), lhef::LHEProxy.find(), ConversionTrackEcalImpactPoint.find(), cond::IOVSequence.find(), Book.find(), DTBufferTree< int, std::vector< int > * >.find(), DTBufferTree< int, int >.find(), DTBufferTree< Key, Content >.find(), vector< int >.find(), EcalCondTowerObjectContainer< T >.find(), EcalCondObjectContainer< EcalLaserAPDPNpair >.find(), EcalCondObjectContainer< Values >.find(), EcalCondObjectContainer< T >.find(), HcalNumberingFromDDD.find(), pat::GenericOverlapFinder< Distance >.find(), FWEventItemsManager.find(), RefGetter< T >.find(), edm::RefGetter< T >.find(), CrossingPtBasedLinearizationPointFinder.find(), CaloRecHitMetaCollectionV.find(), LutXml.find(), MuonAnalyzerSBSM.find(), cond::SmallWORMDict.find(), edm::RegionIndex< T >.find(), RegionIndex< T >.find(), EcalContainer< DetId, T >.find(), EcalContainer< ESDetId, Item >.find(), EcalContainer< EcalScDetId, Item >.find(), EcalContainer< EEDetId, Item >.find(), EcalContainer< EcalTrigTowerDetId, Item >.find(), EcalContainer< EBDetId, Item >.find(), LMFCorrCoefDat.find(), CSCBaseElectronicsSim.find(), edm::TriggerResults.find(), StMeasurementDetSet.find(), l1t::IntervalManager< TimeType, PayloadType >.find(), edm::EventSetup.find(), edm::AssociationMap< Tag >.find(), edm::AssociationMap< edm::OneToManyWithQuality< TrackingVertexCollection, edm::View< reco::Vertex >, double > >.find(), edm::AssociationMap< edm::OneToValue< BasicClusterCollection, float, unsigned short > >.find(), edm::AssociationMap< edm::OneToMany< JetC, reco::TrackCollection > >.find(), edm::AssociationMap< edm::OneToManyWithQuality< edm::View< reco::Vertex >, TrackingVertexCollection, double > >.find(), edm::AssociationMap< edm::OneToValue< reco::TrackCollection, reco::TauImpactParameterTrackData > >.find(), edm::AssociationMap< edm::OneToManyWithQualityGeneric< TrackingParticleCollection, edm::View< reco::Track >, double > >.find(), edm::AssociationMap< edm::OneToManyWithQualityGeneric< edm::View< reco::Track >, TrackingParticleCollection, double > >.find(), DTTrig.find(), FWGeometry.find(), edm::service::TriggerNamesService.find(), edm::MapOfVectors< std::string, DeviceDescription * >.find(), edm::MapOfVectors< std::string, TkDcuPsuMap * >.find(), edm::MapOfVectors< std::string, FedConnection * >.find(), edm::MapOfVectors< std::string, AnalysisDescription * >.find(), edm::MapOfVectors< std::string, FedDescription * >.find(), edm::MapOfVectors< std::string, DcuDetId >.find(), edm::MapOfVectors< K, T >.find(), MapOfVectors< K, T >.find(), edm::SortedCollection< CaloTower >.find(), edm::SortedCollection< EcalRecHit >.find(), edm::SortedCollection< CaloTowerConstituentsMap::MapItem >.find(), edm::SortedCollection< T, SORT >.find(), ElectronDqmAnalyzerBase.find(), cond::IOVRange.find(), edm::DataFrameContainer.find(), edm::DetSetLazyVector< T >.find(), const_iterator.find(), edm::DetSetVector< SiStripRawDigi >.find(), edm::DetSetVector< RPCDigiSimLink >.find(), edm::DetSetVector< T >.find(), DetSetVector< SiStripProcessedRawDigi >.find(), edm::DetSetVector< SiStripDigi >.find(), FourVectorHLT::PathInfoCollection.find(), HLTMonSimpleBTag::PathInfoCollection.find(), edm::eventsetup::EventSetupRecord.find(), edm::DetSetRefVector< T, C >.find(), ora::MappingElement.find(), PhysicsTools::Calibration::MVAComputerContainer.find(), cond::IOVProxy.find(), edm::Trie< T >.find(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.find(), CaloTowersCreationAlgo.find(), DetSetVector< T >.find(), DetSetVector< SiPixelCluster >.find(), DetSetVector< ClusterType >.find(), edmNew::DetSetVector< T >.find(), DetSetVector< SiStripCluster >.find(), HLTInclusiveVBFSource::PathInfoCollection.find(), LazyGetter< T >.find(), edm::LazyGetter< T >.find(), Vispa.Main.TabController.TabController.find(), HLTJetMETDQMSource::PathInfoCollection.find(), BTagHLTOfflineSource::PathInfoCollection.find(), FourVectorHLTOnline::PathInfoCollection.find(), FourVectorHLTOffline::PathInfoCollection.find(), TrigResRateMon::PathInfoCollection.find(), JetMETHLTOfflineSource::PathInfoCollection.find(), and min.

Referenced by BeautifulSoup.PageElement.append(), and BeautifulSoup.PageElement.insert().

181  def insert(self, position, newChild):
182  if (isinstance(newChild, basestring)
183  or isinstance(newChild, unicode)) \
184  and not isinstance(newChild, NavigableString):
185  newChild = NavigableString(newChild)
186 
187  position = min(position, len(self.contents))
188  if hasattr(newChild, 'parent') and newChild.parent != None:
189  # We're 'inserting' an element that's already one
190  # of this object's children.
191  if newChild.parent == self:
192  index = self.find(newChild)
193  if index and index < position:
194  # Furthermore we're moving it further down the
195  # list of this object's children. That means that
196  # when we extract this element, our target index
197  # will jump down one.
198  position = position - 1
199  newChild.extract()
200 
201  newChild.parent = self
202  previousChild = None
203  if position == 0:
204  newChild.previousSibling = None
205  newChild.previous = self
206  else:
207  previousChild = self.contents[position-1]
208  newChild.previousSibling = previousChild
209  newChild.previousSibling.nextSibling = newChild
210  newChild.previous = previousChild._lastRecursiveChild()
211  if newChild.previous:
212  newChild.previous.next = newChild
213 
214  newChildsLastElement = newChild._lastRecursiveChild()
215 
216  if position >= len(self.contents):
217  newChild.nextSibling = None
218 
219  parent = self
220  parentsNextSibling = None
221  while not parentsNextSibling:
222  parentsNextSibling = parent.nextSibling
223  parent = parent.parent
224  if not parent: # This is the last element in the document.
225  break
226  if parentsNextSibling:
227  newChildsLastElement.next = parentsNextSibling
228  else:
229  newChildsLastElement.next = None
230  else:
231  nextChild = self.contents[position]
232  newChild.nextSibling = nextChild
233  if newChild.nextSibling:
234  newChild.nextSibling.previousSibling = newChild
235  newChildsLastElement.next = nextChild
236 
237  if newChildsLastElement.next:
238  newChildsLastElement.next.previous = newChildsLastElement
239  self.contents.insert(position, newChild)
#define min(a, b)
Definition: mlp_lapack.h:161
def BeautifulSoup.PageElement.insert (   self,
  position,
  newChild 
)

Definition at line 180 of file BeautifulSoup.py.

References L1GctProcessor::Pipeline< T >.contents, dqm_interfaces.DirFetcher.contents, CaloRecHitMetaCollectionItem.find(), SimpleCaloRecHitMetaCollection< C >.find(), CaloRecHitMetaCollectionItemT< T >.find(), PhysicsTools::MVATrainerContainer.find(), ElectronMCTruthFinder.find(), Overlayer.find(), PizeroMCTruthFinder.find(), CaloRecHitMetaCollection.find(), PhysicsTools::SourceVariableSet.find(), StringMap.find(), pos::PixelConfig.find(), ThePEG::ProxyBase.find(), PhotonMCTruthFinder.find(), edm::ActionTable.find(), CaloRecHitMetaCollectionFast.find(), ora::PoolDbCache.find(), AlignSetup< Alignables >.find(), AlignSetup< Type >.find(), AlignSetup< align::Alignables >.find(), ESCondObjectContainer< T >.find(), ThePEG::Proxy< Proxy >.find(), ThePEG::Proxy< T >.find(), lhef::LHEProxy.find(), ConversionTrackEcalImpactPoint.find(), cond::IOVSequence.find(), Book.find(), DTBufferTree< int, std::vector< int > * >.find(), DTBufferTree< int, int >.find(), DTBufferTree< Key, Content >.find(), vector< int >.find(), EcalCondTowerObjectContainer< T >.find(), EcalCondObjectContainer< T >.find(), EcalCondObjectContainer< EcalLaserAPDPNpair >.find(), EcalCondObjectContainer< Values >.find(), HcalNumberingFromDDD.find(), pat::GenericOverlapFinder< Distance >.find(), FWEventItemsManager.find(), RefGetter< T >.find(), edm::RefGetter< T >.find(), CrossingPtBasedLinearizationPointFinder.find(), CaloRecHitMetaCollectionV.find(), MuonAnalyzerSBSM.find(), LutXml.find(), RegionIndex< T >.find(), edm::RegionIndex< T >.find(), cond::SmallWORMDict.find(), EcalContainer< DetId, T >.find(), EcalContainer< EcalTrigTowerDetId, Item >.find(), EcalContainer< ESDetId, Item >.find(), EcalContainer< EcalScDetId, Item >.find(), EcalContainer< EEDetId, Item >.find(), EcalContainer< EBDetId, Item >.find(), LMFCorrCoefDat.find(), CSCBaseElectronicsSim.find(), edm::TriggerResults.find(), StMeasurementDetSet.find(), l1t::IntervalManager< TimeType, PayloadType >.find(), edm::EventSetup.find(), edm::AssociationMap< Tag >.find(), edm::AssociationMap< edm::OneToManyWithQuality< TrackingVertexCollection, edm::View< reco::Vertex >, double > >.find(), edm::AssociationMap< edm::OneToMany< JetC, reco::TrackCollection > >.find(), edm::AssociationMap< edm::OneToManyWithQuality< edm::View< reco::Vertex >, TrackingVertexCollection, double > >.find(), edm::AssociationMap< edm::OneToManyWithQualityGeneric< edm::View< reco::Track >, TrackingParticleCollection, double > >.find(), edm::AssociationMap< edm::OneToValue< reco::TrackCollection, reco::TauImpactParameterTrackData > >.find(), edm::AssociationMap< edm::OneToManyWithQualityGeneric< TrackingParticleCollection, edm::View< reco::Track >, double > >.find(), edm::AssociationMap< edm::OneToValue< BasicClusterCollection, float, unsigned short > >.find(), DTTrig.find(), FWGeometry.find(), edm::service::TriggerNamesService.find(), MapOfVectors< K, T >.find(), edm::MapOfVectors< std::string, TkDcuPsuMap * >.find(), edm::MapOfVectors< std::string, DcuDetId >.find(), edm::MapOfVectors< std::string, DeviceDescription * >.find(), edm::MapOfVectors< std::string, FedDescription * >.find(), edm::MapOfVectors< std::string, AnalysisDescription * >.find(), edm::MapOfVectors< std::string, FedConnection * >.find(), edm::MapOfVectors< K, T >.find(), edm::SortedCollection< CaloTower >.find(), edm::SortedCollection< EcalRecHit >.find(), edm::SortedCollection< CaloTowerConstituentsMap::MapItem >.find(), edm::SortedCollection< T, SORT >.find(), cond::IOVRange.find(), ElectronDqmAnalyzerBase.find(), edm::DataFrameContainer.find(), edm::DetSetLazyVector< T >.find(), const_iterator.find(), edm::DetSetVector< SiStripDigi >.find(), DetSetVector< SiStripProcessedRawDigi >.find(), edm::DetSetVector< SiStripRawDigi >.find(), edm::DetSetVector< T >.find(), edm::DetSetVector< RPCDigiSimLink >.find(), FourVectorHLT::PathInfoCollection.find(), HLTMonSimpleBTag::PathInfoCollection.find(), edm::eventsetup::EventSetupRecord.find(), edm::DetSetRefVector< T, C >.find(), ora::MappingElement.find(), PhysicsTools::Calibration::MVAComputerContainer.find(), cond::IOVProxy.find(), edm::Trie< T >.find(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.find(), CaloTowersCreationAlgo.find(), edmNew::DetSetVector< T >.find(), DetSetVector< SiStripCluster >.find(), DetSetVector< SiPixelCluster >.find(), DetSetVector< ClusterType >.find(), DetSetVector< T >.find(), HLTInclusiveVBFSource::PathInfoCollection.find(), LazyGetter< T >.find(), edm::LazyGetter< T >.find(), Vispa.Main.TabController.TabController.find(), HLTJetMETDQMSource::PathInfoCollection.find(), BTagHLTOfflineSource::PathInfoCollection.find(), FourVectorHLTOnline::PathInfoCollection.find(), FourVectorHLTOffline::PathInfoCollection.find(), TrigResRateMon::PathInfoCollection.find(), JetMETHLTOfflineSource::PathInfoCollection.find(), BeautifulSoup.PageElement.insert(), and min.

181  def insert(self, position, newChild):
182  if (isinstance(newChild, basestring)
183  or isinstance(newChild, unicode)) \
184  and not isinstance(newChild, NavigableString):
185  newChild = NavigableString(newChild)
186 
187  position = min(position, len(self.contents))
188  if hasattr(newChild, 'parent') and newChild.parent != None:
189  # We're 'inserting' an element that's already one
190  # of this object's children.
191  if newChild.parent == self:
192  index = self.find(newChild)
193  if index and index < position:
194  # Furthermore we're moving it further down the
195  # list of this object's children. That means that
196  # when we extract this element, our target index
197  # will jump down one.
198  position = position - 1
199  newChild.extract()
200 
201  newChild.parent = self
202  previousChild = None
203  if position == 0:
204  newChild.previousSibling = None
205  newChild.previous = self
206  else:
207  previousChild = self.contents[position-1]
208  newChild.previousSibling = previousChild
209  newChild.previousSibling.nextSibling = newChild
210  newChild.previous = previousChild._lastRecursiveChild()
211  if newChild.previous:
212  newChild.previous.next = newChild
213 
214  newChildsLastElement = newChild._lastRecursiveChild()
215 
216  if position >= len(self.contents):
217  newChild.nextSibling = None
218 
219  parent = self
220  parentsNextSibling = None
221  while not parentsNextSibling:
222  parentsNextSibling = parent.nextSibling
223  parent = parent.parent
224  if not parent: # This is the last element in the document.
225  break
226  if parentsNextSibling:
227  newChildsLastElement.next = parentsNextSibling
228  else:
229  newChildsLastElement.next = None
230  else:
231  nextChild = self.contents[position]
232  newChild.nextSibling = nextChild
233  if newChild.nextSibling:
234  newChild.nextSibling.previousSibling = newChild
235  newChildsLastElement.next = nextChild
236 
237  if newChildsLastElement.next:
238  newChildsLastElement.next.previous = newChildsLastElement
239  self.contents.insert(position, newChild)
#define min(a, b)
Definition: mlp_lapack.h:161
def BeautifulSoup.PageElement.nextGenerator (   self)

Definition at line 350 of file BeautifulSoup.py.

References BeautifulSoup.PageElement.nextGenerator().

351  def nextGenerator(self):
352  i = self
353  while i:
354  i = i.next
355  yield i
def BeautifulSoup.PageElement.nextGenerator (   self)

Definition at line 350 of file BeautifulSoup.py.

Referenced by BeautifulSoup.PageElement.findAllNext(), and BeautifulSoup.PageElement.nextGenerator().

351  def nextGenerator(self):
352  i = self
353  while i:
354  i = i.next
355  yield i
def BeautifulSoup.PageElement.nextSiblingGenerator (   self)

Definition at line 356 of file BeautifulSoup.py.

Referenced by BeautifulSoup.PageElement.findNextSiblings(), and BeautifulSoup.PageElement.nextSiblingGenerator().

357  def nextSiblingGenerator(self):
358  i = self
359  while i:
360  i = i.nextSibling
361  yield i
def BeautifulSoup.PageElement.nextSiblingGenerator (   self)

Definition at line 356 of file BeautifulSoup.py.

References BeautifulSoup.PageElement.nextSiblingGenerator().

357  def nextSiblingGenerator(self):
358  i = self
359  while i:
360  i = i.nextSibling
361  yield i
def BeautifulSoup.PageElement.parentGenerator (   self)

Definition at line 374 of file BeautifulSoup.py.

Referenced by BeautifulSoup.PageElement.findParents(), and BeautifulSoup.PageElement.parentGenerator().

375  def parentGenerator(self):
376  i = self
377  while i:
378  i = i.parent
379  yield i
def BeautifulSoup.PageElement.parentGenerator (   self)

Definition at line 374 of file BeautifulSoup.py.

References BeautifulSoup.PageElement.parentGenerator().

375  def parentGenerator(self):
376  i = self
377  while i:
378  i = i.parent
379  yield i
def BeautifulSoup.PageElement.previousGenerator (   self)

Definition at line 362 of file BeautifulSoup.py.

References BeautifulSoup.PageElement.previousGenerator().

363  def previousGenerator(self):
364  i = self
365  while i:
366  i = i.previous
367  yield i
def BeautifulSoup.PageElement.previousGenerator (   self)

Definition at line 362 of file BeautifulSoup.py.

Referenced by BeautifulSoup.PageElement.findAllPrevious(), and BeautifulSoup.PageElement.previousGenerator().

363  def previousGenerator(self):
364  i = self
365  while i:
366  i = i.previous
367  yield i
def BeautifulSoup.PageElement.previousSiblingGenerator (   self)

Definition at line 368 of file BeautifulSoup.py.

References BeautifulSoup.PageElement.previousSiblingGenerator().

369  def previousSiblingGenerator(self):
370  i = self
371  while i:
372  i = i.previousSibling
373  yield i
def BeautifulSoup.PageElement.previousSiblingGenerator (   self)

Definition at line 368 of file BeautifulSoup.py.

Referenced by BeautifulSoup.PageElement.findPreviousSiblings(), and BeautifulSoup.PageElement.previousSiblingGenerator().

369  def previousSiblingGenerator(self):
370  i = self
371  while i:
372  i = i.previousSibling
373  yield i
def BeautifulSoup.PageElement.replaceWith (   self,
  replaceWith 
)

Definition at line 130 of file BeautifulSoup.py.

References cond::PayLoadInspector< DataT >.extract(), BeautifulSoup.PageElement.extract(), python.multivaluedict.MyUserList.parent, BeautifulSoup.PageElement.parent, and BeautifulSoup.PageElement.replaceWith().

131  def replaceWith(self, replaceWith):
132  oldParent = self.parent
133  myIndex = self.parent.contents.index(self)
134  if hasattr(replaceWith, 'parent') and replaceWith.parent == self.parent:
135  # We're replacing this element with one of its siblings.
136  index = self.parent.contents.index(replaceWith)
137  if index and index < myIndex:
138  # Furthermore, it comes before this element. That
139  # means that when we extract it, the index of this
140  # element will change.
141  myIndex = myIndex - 1
142  self.extract()
143  oldParent.insert(myIndex, replaceWith)
def BeautifulSoup.PageElement.replaceWith (   self,
  replaceWith 
)

Definition at line 130 of file BeautifulSoup.py.

References cond::PayLoadInspector< DataT >.extract(), BeautifulSoup.PageElement.extract(), python.multivaluedict.MyUserList.parent, and BeautifulSoup.PageElement.parent.

Referenced by BeautifulSoup.PageElement.replaceWith().

131  def replaceWith(self, replaceWith):
132  oldParent = self.parent
133  myIndex = self.parent.contents.index(self)
134  if hasattr(replaceWith, 'parent') and replaceWith.parent == self.parent:
135  # We're replacing this element with one of its siblings.
136  index = self.parent.contents.index(replaceWith)
137  if index and index < myIndex:
138  # Furthermore, it comes before this element. That
139  # means that when we extract it, the index of this
140  # element will change.
141  myIndex = myIndex - 1
142  self.extract()
143  oldParent.insert(myIndex, replaceWith)
def BeautifulSoup.PageElement.setup (   self,
  parent = None,
  previous = None 
)
Sets up the initial relations between this element and
other elements.

Definition at line 118 of file BeautifulSoup.py.

Referenced by BeautifulSoup.Tag._invert(), and BeautifulSoup.PageElement.setup().

119  def setup(self, parent=None, previous=None):
120  """Sets up the initial relations between this element and
121  other elements."""
122  self.parent = parent
123  self.previous = previous
124  self.next = None
125  self.previousSibling = None
126  self.nextSibling = None
127  if self.parent and self.parent.contents:
128  self.previousSibling = self.parent.contents[-1]
129  self.previousSibling.nextSibling = self
def BeautifulSoup.PageElement.setup (   self,
  parent = None,
  previous = None 
)
Sets up the initial relations between this element and
other elements.

Definition at line 118 of file BeautifulSoup.py.

References BeautifulSoup.PageElement.next, BeautifulSoup.PageElement.nextSibling, python.multivaluedict.MyUserList.parent, BeautifulSoup.PageElement.parent, BeautifulSoup.PageElement.previous, BeautifulSoup.PageElement.previousSibling, and BeautifulSoup.PageElement.setup().

119  def setup(self, parent=None, previous=None):
120  """Sets up the initial relations between this element and
121  other elements."""
122  self.parent = parent
123  self.previous = previous
124  self.next = None
125  self.previousSibling = None
126  self.nextSibling = None
127  if self.parent and self.parent.contents:
128  self.previousSibling = self.parent.contents[-1]
129  self.previousSibling.nextSibling = self
def BeautifulSoup.PageElement.substituteEncoding (   self,
  str,
  encoding = None 
)

Definition at line 381 of file BeautifulSoup.py.

References BeautifulSoup.PageElement.substituteEncoding().

382  def substituteEncoding(self, str, encoding=None):
383  encoding = encoding or "utf-8"
384  return str.replace("%SOUP-ENCODING%", encoding)
def BeautifulSoup.PageElement.substituteEncoding (   self,
  str,
  encoding = None 
)

Definition at line 381 of file BeautifulSoup.py.

Referenced by BeautifulSoup.Tag._invert(), BeautifulSoup.ProcessingInstruction.decodeGivenEventualEncoding(), and BeautifulSoup.PageElement.substituteEncoding().

382  def substituteEncoding(self, str, encoding=None):
383  encoding = encoding or "utf-8"
384  return str.replace("%SOUP-ENCODING%", encoding)
def BeautifulSoup.PageElement.toEncoding (   self,
  s,
  encoding = None 
)
Encodes an object to a string in some encoding, or to Unicode.
.

Definition at line 385 of file BeautifulSoup.py.

References BeautifulSoup.PageElement.toEncoding().

Referenced by BeautifulSoup.PageElement.toEncoding().

386  def toEncoding(self, s, encoding=None):
387  """Encodes an object to a string in some encoding, or to Unicode.
388  ."""
389  if isinstance(s, unicode):
390  if encoding:
391  s = s.encode(encoding)
392  elif isinstance(s, str):
393  if encoding:
394  s = s.encode(encoding)
395  else:
396  s = unicode(s)
397  else:
398  if encoding:
399  s = self.toEncoding(str(s), encoding)
400  else:
401  s = unicode(s)
402  return s
def BeautifulSoup.PageElement.toEncoding (   self,
  s,
  encoding = None 
)
Encodes an object to a string in some encoding, or to Unicode.
.

Definition at line 385 of file BeautifulSoup.py.

References BeautifulSoup.PageElement.toEncoding().

386  def toEncoding(self, s, encoding=None):
387  """Encodes an object to a string in some encoding, or to Unicode.
388  ."""
389  if isinstance(s, unicode):
390  if encoding:
391  s = s.encode(encoding)
392  elif isinstance(s, str):
393  if encoding:
394  s = s.encode(encoding)
395  else:
396  s = unicode(s)
397  else:
398  if encoding:
399  s = self.toEncoding(str(s), encoding)
400  else:
401  s = unicode(s)
402  return s

Member Data Documentation

BeautifulSoup.PageElement.fetchNextSiblings = findNextSiblings
static

Definition at line 268 of file BeautifulSoup.py.

BeautifulSoup.PageElement.fetchParents = findParents
static

Definition at line 314 of file BeautifulSoup.py.

BeautifulSoup.PageElement.fetchPrevious = findAllPrevious
static

Definition at line 281 of file BeautifulSoup.py.

BeautifulSoup.PageElement.fetchPreviousSiblings = findPreviousSiblings
static

Definition at line 295 of file BeautifulSoup.py.

BeautifulSoup.PageElement.next

Definition at line 123 of file BeautifulSoup.py.

Referenced by BeautifulSoup.PageElement.setup().

BeautifulSoup.PageElement.nextSibling

Definition at line 125 of file BeautifulSoup.py.

Referenced by BeautifulSoup.Tag._invert(), BeautifulSoup.PageElement.extract(), and BeautifulSoup.PageElement.setup().

BeautifulSoup.PageElement.parent

Definition at line 121 of file BeautifulSoup.py.

Referenced by argparse.HelpFormatter._Section.__init__(), Vispa.Gui.ConnectableWidget.ConnectableWidget.addMenuEntry(), Vispa.Views.LineDecayView.LineDecayContainer.applyFilter(), Vispa.Views.BoxDecayView.BoxDecayContainer.arrangeUsingRelations(), Vispa.Views.BoxDecayView.BoxDecayContainer.autolayoutAlgorithm(), Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner.autosizeScrollArea(), Vispa.Views.BoxDecayView.BoxDecayContainer.autosizeScrollArea(), Vispa.Gui.PortWidget.PortWidget.connectionPoint(), Vispa.Main.StartupScreen.StartupScreen.createDescriptionWidget(), Vispa.Views.BoxDecayView.BoxDecayContainer.dataAccessor(), Vispa.Views.LineDecayView.LineDecayContainer.dataAccessor(), Vispa.Views.LineDecayView.DecayLine.dataAccessor(), Vispa.Views.LineDecayView.LineDecayContainer.delete(), Vispa.Views.LineDecayView.DecayNode.delete(), Vispa.Views.LineDecayView.DecayLine.delete(), Vispa.Gui.VispaWidget.VispaWidget.delete(), Vispa.Gui.VispaWidget.VispaWidget.dragWidget(), Vispa.Share.ImageExporter.ImageExporter.exportImageDialog(), Vispa.Views.LineDecayView.DecayLine.extendedSize(), BeautifulSoup.PageElement.extract(), argparse.HelpFormatter._Section.format_help(), python.rootplot.argparse.HelpFormatter._Section.format_help(), Vispa.Gui.VispaWidget.VispaWidget.keyPressEvent(), Vispa.Gui.MenuWidget.MenuWidget.leaveEvent(), Vispa.Gui.ConnectableWidget.ConnectableWidget.leaveEvent(), Vispa.Gui.PortWidget.PortWidget.moduleParent(), Vispa.Gui.WidgetContainer.WidgetContainer.mouseDoubleClickEvent(), Vispa.Gui.VispaWidget.VispaWidget.mouseDoubleClickEvent(), Vispa.Gui.PortConnection.PointToPointConnection.mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget.mousePressEvent(), Vispa.Views.LineDecayView.ParticleWidget.mousePressEvent(), Vispa.Views.LineDecayView.DecayNode.move(), Vispa.Views.LineDecayView.LineDecayContainer.noDecorationsMode(), Vispa.Views.LineDecayView.LineDecayContainer.operationId(), Vispa.Views.LineDecayView.DecayLine.paint(), Vispa.Gui.VispaWidget.VispaWidget.paintEvent(), Vispa.Gui.ConnectableWidget.ConnectableWidget.positionizeMenuWidget(), Vispa.Views.LineDecayView.DecayLine.qtLineStyle(), BeautifulSoup.PageElement.replaceWith(), Vispa.Views.WidgetView.WidgetView.restoreSelection(), Vispa.Views.WidgetView.WidgetView.select(), Vispa.Gui.PortConnection.PointToPointConnection.select(), Vispa.Gui.VispaWidget.VispaWidget.select(), Vispa.Views.LineDecayView.LineDecayContainer.select(), BeautifulSoup.PageElement.setup(), Vispa.Views.LineDecayView.LineDecayContainer.sizeHint(), Vispa.Views.LineDecayView.LineDecayContainer.tabController(), Vispa.Views.BoxDecayView.BoxDecayContainer.toggleCollapsed(), Vispa.Views.LineDecayView.DecayNode.unite(), Vispa.Views.PropertyView.PropertyView.valueChanged(), Vispa.Views.BoxDecayView.BoxDecayContainer.widgetByObject(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.widgetDoubleClicked(), and Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.widgetDragged().

BeautifulSoup.PageElement.previous

Definition at line 122 of file BeautifulSoup.py.

Referenced by BeautifulSoup.BeautifulStoneSoup.endData(), BeautifulSoup.PageElement.extract(), BeautifulSoup.PageElement.setup(), and BeautifulSoup.BeautifulStoneSoup.unknown_starttag().

BeautifulSoup.PageElement.previousSibling

Definition at line 124 of file BeautifulSoup.py.

Referenced by BeautifulSoup.PageElement.extract(), and BeautifulSoup.PageElement.setup().