__init__([rawsource]) |
|
append(item) |
|
append_attr_list(attr, values) |
For each element in values, if it does not exist in self[attr], append it. |
asdom([dom]) |
Return a DOM fragment representation of this Node. |
astext() |
|
attlist() |
|
clear() |
|
coerce_append_attr_list(attr, value) |
First, convert both self[attr] and value to a non-string sequence type; if either is not already a sequence, convert it to a list of one element. |
copy() |
|
copy_attr_coerce(attr, value, replace) |
If attr is an attribute of self and either self[attr] or value is a list, convert all non-sequence values to a sequence of 1 element and then concatenate the two sequence, setting the result to self[attr]. |
copy_attr_concatenate(attr, value, replace) |
If attr is an attribute of self and both self[attr] and value are lists, concatenate the two sequences, setting the result to self[attr]. |
copy_attr_consistent(attr, value, replace) |
If replace is True or selfpattr] is None, replace self[attr] with value. |
copy_attr_convert(attr, value[, replace]) |
If attr is an attribute of self, set self[attr] to [self[attr], value], otherwise set self[attr] to value. |
deepcopy() |
|
delattr(attr) |
|
emptytag() |
|
endtag() |
|
extend(item) |
|
first_child_matching_class(childclass[, ...]) |
Return the index of the first child whose class exactly matches. |
first_child_not_matching_class(childclass[, ...]) |
Return the index of the first child whose class does not match. |
get(key[, failobj]) |
|
get_language_code([fallback]) |
Return node’s language tag. |
has_key(attr) |
|
hasattr(attr) |
|
index(item) |
|
insert(index, item) |
|
is_not_default(key) |
|
is_not_known_attribute(attr) |
Returns True if and only if the given attribute is NOT recognized by this class. |
is_not_list_attribute(attr) |
Returns True if and only if the given attribute is NOT one of the basic list attributes defined for all Elements. |
next_node([condition, include_self, ...]) |
Return the first node in the iterable returned by traverse(), or None if the iterable is empty. |
non_default_attributes() |
|
note_referenced_by([name, id]) |
Note that this Element has been referenced by its name name or id id. |
pformat([indent, level]) |
|
pop([i]) |
|
remove(item) |
|
replace(old, new) |
Replace one child Node with another child or children. |
replace_attr(attr, value[, force]) |
If self[attr] does not exist or force is True or omitted, set self[attr] to value, otherwise do nothing. |
replace_self(new) |
Replace self node with new, where new is a node or a list of nodes. |
set_class(name) |
Add a new class to the “classes” attribute. |
setdefault(key[, failobj]) |
|
setup_child(child) |
|
shortrepr() |
|
starttag([quoteattr]) |
|
traverse([condition, include_self, descend, ...]) |
Return an iterable containing |
update_all_atts(dict_[, update_fun, ...]) |
Updates all attributes from node or dictionary dict_. |
update_all_atts_coercion(dict_[, replace, ...]) |
Updates all attributes from node or dictionary dict_. |
update_all_atts_concatenating(dict_[, ...]) |
Updates all attributes from node or dictionary dict_. |
update_all_atts_consistantly(dict_[, ...]) |
Updates all attributes from node or dictionary dict_. |
update_all_atts_convert(dict_[, and_source]) |
Updates all attributes from node or dictionary dict_. |
update_basic_atts(dict_) |
Update basic attributes (‘ids’, ‘names’, ‘classes’, ‘dupnames’, but not ‘source’) from node or dictionary dict_. |
walk(visitor) |
Traverse a tree of Node objects, calling the dispatch_visit() method of visitor when entering each node. |
walkabout(visitor) |
Perform a tree traversal similarly to Node.walk() (which see), except also call the dispatch_departure() method before exiting each node. |