Package diffpy :: Package pdfgui :: Module bugreport :: Class _HTMLFormActionGetter
[hide private]
[frames] | no frames]

Class _HTMLFormActionGetter

source code

markupbase.ParserBase --+    
                        |    
    HTMLParser.HTMLParser --+
                            |
                           _HTMLFormActionGetter

Helper HTMLParser for extracting action attriubte from the
first form.

Instance data:

_form_actions   -- list of action values from all <form> tags found.

See also getFormAction().



Instance Methods [hide private]
 
handle_starttag(self, tag, attrs)
Store "action" attributes from all HTML forms in _form_actions.
source code
 
__call__(self, content)
Obtain action from the first form in the document.
source code

Inherited from HTMLParser.HTMLParser: __init__, check_for_whole_start_tag, clear_cdata_mode, close, error, feed, get_starttag_text, goahead, handle_charref, handle_comment, handle_data, handle_decl, handle_endtag, handle_entityref, handle_pi, handle_startendtag, parse_endtag, parse_pi, parse_starttag, reset, set_cdata_mode, unescape, unknown_decl

Inherited from markupbase.ParserBase: getpos, parse_comment, parse_declaration, parse_marked_section, updatepos

Inherited from markupbase.ParserBase (private): _parse_doctype_attlist, _parse_doctype_element, _parse_doctype_entity, _parse_doctype_notation, _parse_doctype_subset, _scan_name

Class Variables [hide private]
  _form_actions = None

Inherited from HTMLParser.HTMLParser: CDATA_CONTENT_ELEMENTS

Inherited from markupbase.ParserBase (private): _decl_otherchars

Method Details [hide private]

handle_starttag(self, tag, attrs)

source code 
Store "action" attributes from all HTML forms in _form_actions.
        

Overrides: HTMLParser.HTMLParser.handle_starttag

__call__(self, content)
(Call operator)

source code 
Obtain action from the first form in the document.

content -- HTML code

Return action string.
Raise ValueError for invalid HTML code or when action cannot be
extracted.