|
__init__(self,
parser,
name,
attrs=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
parent=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
previous=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... )
Basic constructor. |
|
|
|
get(self,
key,
default=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... )
Returns the value of the 'key' attribute for the tag, or the value
given for 'default' if it doesn't have that attribute. |
|
|
|
|
|
__getitem__(self,
key)
tag[key] returns the value of the 'key' attribute for the tag, and
throws an exception if it's not there. |
|
|
|
__iter__(self)
Iterating over a tag iterates over its contents. |
|
|
|
__len__(self)
The length of a tag is the length of its list of contents. |
|
|
|
|
|
__nonzero__(self)
A tag is non-None even if it has no contents. |
|
|
|
__setitem__(self,
key,
value)
Setting tag[key] sets the value of the 'key' attribute for the
tag. |
|
|
|
__delitem__(self,
key)
Deleting tag[key] deletes all 'key' attributes for the tag. |
|
|
|
__call__(self,
*args,
**kwargs)
Calling a tag like a function is the same as calling its findAll()
method. |
|
|
|
|
|
__eq__(self,
other)
Returns true iff this tag has the same name, the same attributes,
and the same contents (recursively) as the given tag. |
|
|
|
__ne__(self,
other)
Returns true iff this tag is not identical to the other tag, as
defined in __eq__. |
|
|
|
__repr__(self,
encoding=' utf-8 ' )
Renders this tag as a string. |
|
|
|
|
|
__str__(self,
encoding=' utf-8 ' ,
prettyPrint=False,
indentLevel=0)
Returns a string or Unicode representation of this tag and its
contents. |
|
|
|
prettify(self,
encoding=' utf-8 ' ) |
|
|
|
renderContents(self,
encoding=' utf-8 ' ,
prettyPrint=False,
indentLevel=0)
Renders the contents of this tag as a string in the given
encoding. |
|
|
|
find(self,
name=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
attrs={ } ,
recursive=True,
text=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
**kwargs)
Return only the first child of this Tag matching the given
criteria. |
|
|
|
findChild(self,
name=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
attrs={ } ,
recursive=True,
text=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
**kwargs)
Return only the first child of this Tag matching the given
criteria. |
|
|
|
findAll(self,
name=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
attrs={ } ,
recursive=True,
text=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
limit=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
**kwargs)
Extracts a list of Tag objects that match the given criteria. |
|
|
|
findChildren(self,
name=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
attrs={ } ,
recursive=True,
text=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
limit=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
**kwargs)
Extracts a list of Tag objects that match the given criteria. |
|
|
|
first(self,
name=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
attrs={ } ,
recursive=True,
text=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
**kwargs)
Return only the first child of this Tag matching the given
criteria. |
|
|
|
fetch(self,
name=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
attrs={ } ,
recursive=True,
text=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
limit=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
**kwargs)
Extracts a list of Tag objects that match the given criteria. |
|
|
|
fetchText(self,
text=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
recursive=True,
limit=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ) |
|
|
|
firstText(self,
text=<CHEM.DB.rdb.search.NameRxnPatternMatchingModel.SearchSentence... ,
recursive=True) |
|
|
|
append(self,
tag)
Appends the given tag to the contents of this tag. |
|
|
|
_getAttrMap(self)
Initializes a map representation of this tag's attributes, if not
already initialized. |
|
|
|
|
|
recursiveChildGenerator(self) |
|
|
Inherited from PageElement :
extract ,
fetchNextSiblings ,
fetchParents ,
fetchPrevious ,
fetchPreviousSiblings ,
findAllNext ,
findAllPrevious ,
findNext ,
findNextSibling ,
findNextSiblings ,
findParent ,
findParents ,
findPrevious ,
findPreviousSibling ,
findPreviousSiblings ,
insert ,
nextGenerator ,
nextSiblingGenerator ,
parentGenerator ,
previousGenerator ,
previousSiblingGenerator ,
replaceWith ,
setup ,
substituteEncoding ,
toEncoding
|