mò
JÜÉFc           @   s½   d  Z  d Z y d k l Z WnC e j
 o7 y d k Z Wqc e j
 o d k l Z qc Xn Xd k Z d k Z d e i	 f d „  ƒ  YZ
 d „  Z d e i f d	 „  ƒ  YZ d
 „  Z d S(   s?   Contains extensions to Atom objects used with Google Documents.s   api.jfisher (Jeff Fisher)(   s   cElementTreeN(   s   ElementTreet   DocumentListEntryc           B   sA   t  Z d  Z d Z e i Z e i i	 i
 ƒ  Z	 e i i i
 ƒ  Z RS(   s-   The Google Documents version of an Atom Entryt   entry(   t   __name__t
   __module__t   __doc__t   _tagt   atomt   ATOM_NAMESPACEt
   _namespacet   gdatat
   GDataEntryt	   _childrent   copyt   _attributes(    (    (    t2   /mit/freeculture/lib/python/gdata/docs/__init__.pyR        s
    	c         C   s   t  i t |  ƒ S(   sÔ   Converts an XML string into a DocumentListEntry object.

  Args:
    xml_string: string The XML describing a Document List feed entry.

  Returns:
    A DocumentListEntry object corresponding to the given XML.
  N(   R   t   CreateClassFromXMLStringR    t
   xml_string(   R   (    (    R   t   DocumentListEntryFromString)   s     t   DocumentListFeedc           B   s[   t  Z d  Z d Z e i Z e i i	 i
 ƒ  Z	 e i i i
 ƒ  Z d e g f e	 d e i <RS(   s2   A feed containing a list of Google Documents Itemst   feedR   s	   {%s}entry(   R   R   R   R   R   R   R   R	   t	   GDataFeedR   R   R   R    (    (    (    R   R   5   s    	c         C   s   t  i t |  ƒ S(   sË   Converts an XML string into a DocumentListFeed object.

  Args:
    xml_string: string The XML describing a DocumentList feed.

  Returns:
    A DocumentListFeed object corresponding to the given XML.
  N(   R   R   R   R   (   R   (    (    R   t   DocumentListFeedFromString@   s     (   R   t
   __author__t	   xml.etreet   cElementTreet   ElementTreet   ImportErrort   elementtreeR   R	   R
   R    R   R   R   R   (   R    R	   R   R   R   R   R   R   (    (    R   t   ?   s   				