Package rosdeb :: Module BeautifulSoup :: Class PageElement
[frames] | no frames]

Class PageElement

source code

Known Subclasses:

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

Instance Methods
 
setup(self, parent=None, previous=None)
Sets up the initial relations between this element and other elements.
source code
 
replaceWith(self, replaceWith) source code
 
extract(self)
Destructively rips this element out of the tree.
source code
 
insert(self, position, newChild) source code
 
append(self, tag)
Appends the given tag to the contents of this tag.
source code
 
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.
source code
 
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.
source code
 
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.
source code
 
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.
source code
 
fetchNextSiblings(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.
source code
 
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.
source code
 
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.
source code
 
fetchPrevious(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.
source code
 
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.
source code
 
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.
source code
 
fetchPreviousSiblings(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.
source code
 
findParent(self, name=None, attrs={}, **kwargs)
Returns the closest parent of this Tag that matches the given criteria.
source code
 
findParents(self, name=None, attrs={}, limit=None, **kwargs)
Returns the parents of this Tag that match the given criteria.
source code
 
fetchParents(self, name=None, attrs={}, limit=None, **kwargs)
Returns the parents of this Tag that match the given criteria.
source code
 
nextGenerator(self) source code
 
nextSiblingGenerator(self) source code
 
previousGenerator(self) source code
 
previousSiblingGenerator(self) source code
 
parentGenerator(self) source code
 
substituteEncoding(self, str, encoding=None) source code
 
toEncoding(self, s, encoding=None)
Encodes an object to a string in some encoding, or to Unicode.
source code
Method Details

toEncoding(self, s, encoding=None)

source code 

Encodes an object to a string in some encoding, or to Unicode. .