ó
f#ņ]c           @  s  d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l	 j
 j Z e j
 j j d  Z d Z e j e k rē e j e   n  e j
 j j   Z e j j d d e Z e j d d g  d d d	  Z d d
  Z d S(   iĸĸĸĸ(   t   unicode_literalsNu-   urn:uuid:629a694a-9099-11e7-b77e-3497f68b2e96u   1.2.6u4   urn:oasis:names:tc:SAML:2.0:profiles:attribute:XACMLt   create_if_missingu   typeBindingu   elementBindingc         C  sŌ   t  j t  j k r: t  j j j |   } t | j d | S| d k rU t	 j
   } n  t  j j j d | d |  } | j   } |  } t | t j  rŽ | j t  j  } n  | j t j |   | j   } | S(   uý  Parse the given XML and use the document element to create a
    Python instance.

    @param xml_text An XML document.  This should be data (Python 2
    str or Python 3 bytes), or a text (Python 2 unicode or Python 3
    str) in the L{pyxb._InputEncoding} encoding.

    @keyword default_namespace The L{pyxb.Namespace} instance to use as the
    default namespace where there is no default namespace in scope.
    If unspecified or C{None}, the namespace of the module containing
    this function will be used.

    @keyword location_base: An object to be recorded as the base of all
    L{pyxb.utils.utility.Location} instances associated with events and
    objects handled by the parser.  You might pass the URI from which
    the document was obtained.
    t   default_namespacet   fallback_namespacet   location_baseN(   t   pyxbt   XMLStyle_saxert	   _XMLStylet   utilst   domutilst   StringToDOMt   CreateFromDOMt   documentElementt   Nonet	   Namespacet   fallbackNamespacet   bindingt   saxert   make_parsert   getContentHandlert
   isinstancet   _sixt	   text_typet   encodet   _InputEncodingt   parset   iot   BytesIOt
   rootObject(   t   xml_textR   R   t   domR   t   handlert   xmldt   instance(    (    sR   /data/av2000/b2b/venv/lib/python2.7/site-packages/pyxb/bundles/saml20/raw/xacml.pyt   CreateFromDocument$   s    c         C  s4   | d k r t j   } n  t j j j j |  |  S(   uÖ   Create a Python instance from the given DOM node.
    The node tag must correspond to an element declaration in this module.

    @deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.N(   R   R   R   R   R   t   basist   elementt   AnyCreateFromDOM(   t   nodeR   (    (    sR   /data/av2000/b2b/venv/lib/python2.7/site-packages/pyxb/bundles/saml20/raw/xacml.pyR   E   s    (   t
   __future__R    R   t   pyxb.bindingt   pyxb.binding.saxerR   t   pyxb.utils.utilityt   pyxb.utils.domutilst   syst   pyxb.utils.sixR   t   sixR   t   utilityt   UniqueIdentifiert   _GenerationUIDt   _PyXBVersiont   __version__t   PyXBVersionErrort   Objectt   _module_typeBindingst	   namespacet   NamespaceForURIt   TrueR   t   configureCategoriesR   R"   R   (    (    (    sR   /data/av2000/b2b/venv/lib/python2.7/site-packages/pyxb/bundles/saml20/raw/xacml.pyt   <module>   s"   !