googlevoice::util::XMLParser Class Reference
List of all members.
Detailed Description
XML Parser helper that can dig json and html out of the feeds.
The parser takes a ``Voice`` instance, page name, and function to grab data from.
Calling the parser calls the data function once, sets up the ``json`` and ``html``
attributes and returns a ``Folder`` instance for the given page::
>>> o = XMLParser(voice, 'voicemail', lambda: 'some xml payload')
>>> o()
... <Folder ...>
>>> o.json
... 'some json payload'
>>> o.data
... 'loaded json payload'
>>> o.html
... 'some html payload'
Definition at line 251 of file util.py.
Member Function Documentation
def googlevoice::util::XMLParser::__call__ |
( |
|
self |
) |
|
def googlevoice::util::XMLParser::__init__ |
( |
|
self, |
|
|
|
voice, |
|
|
|
name, |
|
|
|
datafunc | |
|
) |
| | |
def googlevoice::util::XMLParser::char_data |
( |
|
self, |
|
|
|
data | |
|
) |
| | |
def googlevoice::util::XMLParser::data |
( |
|
self |
) |
|
Returns the parsed json information after calling the XMLParser
Definition at line 305 of file util.py.
def googlevoice::util::XMLParser::end_element |
( |
|
self, |
|
|
|
name | |
|
) |
| | |
def googlevoice::util::XMLParser::folder |
( |
|
self |
) |
|
Returns associated ``Folder`` instance for given page (``self.name``)
Definition at line 298 of file util.py.
def googlevoice::util::XMLParser::start_element |
( |
|
self, |
|
|
|
name, |
|
|
|
attrs | |
|
) |
| | |
Member Data Documentation
Property Documentation
googlevoice::util::XMLParser::data = property(data) [static] |
googlevoice::util::XMLParser::folder = property(folder) [static] |
The documentation for this class was generated from the following file: