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

Class PageElement

source code


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

Instance Methods [hide private]
 
setup(self, parent=None, previous=None)
Sets up the initial relations between this element and other elements.
source code
 
replaceWith(self, replaceWith) source code
 
replaceWithChildren(self) source code
 
extract(self)
Destructively rips this element out of the tree.
source code
 
_lastRecursiveChild(self)
Finds the last element beneath this object to be parsed.
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
 
_findOne(self, method, name, attrs, text, **kwargs) source code
 
_findAll(self, name, attrs, text, limit, generator, **kwargs)
Iterates over a generator looking for things that match.
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

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

toEncoding(self, s, encoding=None)

source code 

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