| Method | __init__ |
Undocumented |
| Method | cleanup_headings |
No summary |
| Method | copy |
Undocumented |
| Method | count |
Returns the number of occurences of 'text' in this tree. |
| Method | countre |
Returns the number of matches for a regular expression in this tree. |
| Method | decode_urls |
Calls decode_url() on all links that contain urls. See zim.parsing for details. Modifies the parse tree. |
| Method | encode_urls |
Calls encode_url() on all links that contain urls. See zim.parsing for details. Modifies the parse tree. |
| Method | extend |
Undocumented |
| Method | find |
Find first occurence of tag in the tree @returns: a Node object or None |
| Method | findall |
Find all occurences of tag in the tree @param tag: tag name @returns: yields Node objects |
| Method | fromstring |
Set the contents of this tree from XML representation. |
| Method | get_ends_with_newline |
Checks whether this tree ends in a newline or not |
| Method | get_heading_level |
Undocumented |
| Method | get_heading_text |
Undocumented |
| Method | iter_href |
No summary |
| Method | iter_tag_names |
Generator for tags in the page content @returns: yields an unordered list of tag names |
| Method | iter_tokens |
Undocumented |
| Method | remove_heading |
No summary |
| Method | replace |
Modify the tree by replacing all occurences of tag by the return value of func. |
| Method | set_heading_text |
Set the first heading of the parse tree to 'text'. If the tree already has a heading of the specified level or higher it will be replaced. Otherwise the new heading will be prepended. |
| Method | tostring |
Serialize the tree to a XML representation |
| Method | visit |
Visit all nodes of this tree |
| Instance Variable | meta |
Undocumented |
| Property | hascontent |
Returns True if the tree contains any content at all. |
| Property | israw |
Returns True when this is a raw tree (which is representation of TextBuffer, but not really valid). |
| Static Method | _node_to_etree |
Undocumented |
| Method | _do_replace |
Undocumented |
| Method | _elt_to_text |
Undocumented |
| Method | _get_element_ends_with_newline |
Undocumented |
| Method | _get_heading_element |
Undocumented |
| Method | _get_root_attrib |
Undocumented |
| Method | _insert_text |
Undocumented |
| Method | _pop_root_attrib |
Undocumented |
| Method | _replace |
Undocumented |
| Method | _set_root_attrib |
Undocumented |
| Method | _visit |
Undocumented |
| Instance Variable | _etree |
Undocumented |
| Instance Variable | _object_cache |
Undocumented |
| Parameters | |
| include_page_local_links | Undocumented |
| include_anchors | if False remove the target location from the link and only yield unique links to pages |
| Returns | |
yields a list of unique HRef objects | |
| Returns | |
| a 2-tuple of text and heading level or (None, None) |
| Parameters | |
| tags | tag name, or list of tag names |
| func | function to generate replacement values. Function will be called as:
func(node)
Where node is a |