Public Member Functions | Public Attributes | Static Public Attributes | Properties
googlevoice.util.XMLParser Class Reference

List of all members.

Public Member Functions

def __call__
def __init__
def char_data
def data
def end_element
def folder
def start_element

Public Attributes

 datafunc
 html
 name
 voice

Static Public Attributes

 attr = None

Properties

 data = property(data)
 folder = property(folder)

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.


Constructor & Destructor Documentation

def googlevoice.util.XMLParser.__init__ (   self,
  voice,
  name,
  datafunc 
)

Definition at line 279 of file util.py.


Member Function Documentation

Definition at line 285 of file util.py.

def googlevoice.util.XMLParser.char_data (   self,
  data 
)

Definition at line 275 of file util.py.

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 
)

Definition at line 274 of file util.py.

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 
)

Definition at line 271 of file util.py.


Member Data Documentation

Definition at line 269 of file util.py.

Definition at line 279 of file util.py.

Definition at line 279 of file util.py.

Definition at line 279 of file util.py.

Definition at line 279 of file util.py.


Property Documentation

Definition at line 313 of file util.py.

Definition at line 303 of file util.py.


The documentation for this class was generated from the following file:


continuous_ops_alerts
Author(s): Eitan Marder-Eppstein
autogenerated on Fri Dec 6 2013 21:23:50