ó
i4Vdc           @   sR   d  Z  d d l Z d d l m Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d S(   s'   
Utilities for XML generation/parsing.
iÿÿÿÿN(   t   XMLGeneratort   UnserializableContentErrorc           B   s   e  Z RS(    (   t   __name__t
   __module__(    (    (    sc   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/utils/xmlutils.pyR   	   s   t   SimplerXMLGeneratorc           B   s    e  Z d d d  „ Z d „  Z RS(   c         C   sR   | d k r i  } n  |  j | | ƒ | d k	 rA |  j | ƒ n  |  j | ƒ d S(   s9   Convenience method for adding an element with no childrenN(   t   Nonet   startElementt
   characterst
   endElement(   t   selft   namet   contentst   attrs(    (    sc   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/utils/xmlutils.pyt   addQuickElement   s    	c         C   s;   | r' t  j d | ƒ r' t d ƒ ‚ n  t j |  | ƒ d  S(   Ns   [\x00-\x08\x0B-\x0C\x0E-\x1F]s/   Control characters are not supported in XML 1.0(   t   ret   searchR   R    R   (   R	   t   content(    (    sc   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/utils/xmlutils.pyR      s    N(   R   R   R   R   R   (    (    (    sc   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/utils/xmlutils.pyR      s   	(   t   __doc__R   t   xml.sax.saxutilsR    t
   ValueErrorR   R   (    (    (    sc   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/utils/xmlutils.pyt   <module>   s   