Package soovee_lib :: Module parse :: Class Xml
[frames] | no frames]

Class Xml

Xml data parser for serial audio data in Opml and Rss.

Instance Methods
None
__init__(self, xmldata)
Get Xml data from initialized soovee.lib.sv_read object and process for its nodes and attributes with xml.dom.minidom.
list
children(self, node, brake=None)
Parse Xml data for children of a particular node element.
Static Methods
list
opml(data)
Parse a serial audio Opml collection of feeds like Podiobooks.
list
rss(data)
Parse a serial audio RSS feed like Podiobooks.
Method Details

__init__(self, xmldata)
(Constructor)

 

Get Xml data from initialized soovee.lib.sv_read object and process for its nodes and attributes with xml.dom.minidom.

Parameters:
  • xmldata (str) - Raw unparsed Xml data.
Returns: None

opml(data)
Static Method

 

Parse a serial audio Opml collection of feeds like Podiobooks.

  • Possible attributes: title, text, type, xmlUrl, htmlUrl, description
Parameters:
  • data (basestring) - Raw unparsed Ompl file data
Returns: list
List of node dictionaries in Opml data

rss(data)
Static Method

 

Parse a serial audio RSS feed like Podiobooks.

  • Possible Summary tags: title, link, description, webMaster, pubDate, managingEditor, category*, copyright, language, docs, generator, image (url, width, height, link, title), atom:link (href, rel, type), itunes:block, itunes:subtitle, itunes:summary, itunes:author, itunes:explicit, itunes:image (href), itunes:owner, itunes:email, itunes:name, itunes:category (itunes:category (text))
  • Possible Item tags: title, link, comments, description, category*, pubDate, author, guid (isPermaLink), enclosure (url, length,type), itunes:author, itunes:subtitle, itunes:summary, itunes:explicit, itunes:duration, itunes:keywords

* category despite multiple tags will return a single combined value.

Parameters:
  • data (basestring) - Raw unparsed Rss file data
Returns: list
List of node dictionaries in Rss data

children(self, node, brake=None)

 

Parse Xml data for children of a particular node element.

Parameters:
  • node (basestring) - Name of node to locate
  • brake (basestring) - Value that halts checking elements. Default None.
Returns: list
List of node dictionaries