Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
PK!WZDD __init__.pynu[# $Id: __init__.py 3375 2008-02-13 08:05:08Z fredrik $ # elementtree package # -------------------------------------------------------------------- # The ElementTree toolkit is # # Copyright (c) 1999-2008 by Fredrik Lundh # # By obtaining, using, and/or copying this software and/or its # associated documentation, you agree that you have read, understood, # and will comply with the following terms and conditions: # # Permission to use, copy, modify, and distribute this software and # its associated documentation for any purpose and without fee is # hereby granted, provided that the above copyright notice appears in # all copies, and that both that copyright notice and this permission # notice appear in supporting documentation, and that the name of # Secret Labs AB or the author not be used in advertising or publicity # pertaining to distribution of the software without specific, written # prior permission. # # SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD # TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- # ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR # BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE. # -------------------------------------------------------------------- # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/psf/license for licensing details. PK!"/ElementTree.pynu[# # ElementTree # $Id: ElementTree.py 3440 2008-07-18 14:45:01Z fredrik $ # # light-weight XML support for Python 2.3 and later. # # history (since 1.2.6): # 2005-11-12 fl added tostringlist/fromstringlist helpers # 2006-07-05 fl merged in selected changes from the 1.3 sandbox # 2006-07-05 fl removed support for 2.1 and earlier # 2007-06-21 fl added deprecation/future warnings # 2007-08-25 fl added doctype hook, added parser version attribute etc # 2007-08-26 fl added new serializer code (better namespace handling, etc) # 2007-08-27 fl warn for broken /tag searches on tree level # 2007-09-02 fl added html/text methods to serializer (experimental) # 2007-09-05 fl added method argument to tostring/tostringlist # 2007-09-06 fl improved error handling # 2007-09-13 fl added itertext, iterfind; assorted cleanups # 2007-12-15 fl added C14N hooks, copy method (experimental) # # Copyright (c) 1999-2008 by Fredrik Lundh. All rights reserved. # # fredrik@pythonware.com # http://www.pythonware.com # # -------------------------------------------------------------------- # The ElementTree toolkit is # # Copyright (c) 1999-2008 by Fredrik Lundh # # By obtaining, using, and/or copying this software and/or its # associated documentation, you agree that you have read, understood, # and will comply with the following terms and conditions: # # Permission to use, copy, modify, and distribute this software and # its associated documentation for any purpose and without fee is # hereby granted, provided that the above copyright notice appears in # all copies, and that both that copyright notice and this permission # notice appear in supporting documentation, and that the name of # Secret Labs AB or the author not be used in advertising or publicity # pertaining to distribution of the software without specific, written # prior permission. # # SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD # TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- # ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR # BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE. # -------------------------------------------------------------------- # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/psf/license for licensing details. __all__ = [ # public symbols "Comment", "dump", "Element", "ElementTree", "fromstring", "fromstringlist", "iselement", "iterparse", "parse", "ParseError", "PI", "ProcessingInstruction", "QName", "SubElement", "tostring", "tostringlist", "TreeBuilder", "VERSION", "XML", "XMLParser", "XMLTreeBuilder", ] VERSION = "1.3.0" ## # The Element type is a flexible container object, designed to # store hierarchical data structures in memory. The type can be # described as a cross between a list and a dictionary. #

# Each element has a number of properties associated with it: #

# # To create an element instance, use the {@link #Element} constructor # or the {@link #SubElement} factory function. #

# The {@link #ElementTree} class can be used to wrap an element # structure, and convert it from and to XML. ## import sys import re import warnings class _SimpleElementPath(object): # emulate pre-1.2 find/findtext/findall behaviour def find(self, element, tag, namespaces=None): for elem in element: if elem.tag == tag: return elem return None def findtext(self, element, tag, default=None, namespaces=None): elem = self.find(element, tag) if elem is None: return default return elem.text or "" def iterfind(self, element, tag, namespaces=None): if tag[:3] == ".//": for elem in element.iter(tag[3:]): yield elem for elem in element: if elem.tag == tag: yield elem def findall(self, element, tag, namespaces=None): return list(self.iterfind(element, tag, namespaces)) try: from . import ElementPath except ImportError: ElementPath = _SimpleElementPath() ## # Parser error. This is a subclass of SyntaxError. #

# In addition to the exception value, an exception instance contains a # specific exception code in the code attribute, and the line and # column of the error in the position attribute. class ParseError(SyntaxError): pass # -------------------------------------------------------------------- ## # Checks if an object appears to be a valid element object. # # @param An element instance. # @return A true value if this is an element object. # @defreturn flag def iselement(element): # FIXME: not sure about this; might be a better idea to look # for tag/attrib/text attributes return isinstance(element, Element) or hasattr(element, "tag") ## # Element class. This class defines the Element interface, and # provides a reference implementation of this interface. #

# The element name, attribute names, and attribute values can be # either ASCII strings (ordinary Python strings containing only 7-bit # ASCII characters) or Unicode strings. # # @param tag The element name. # @param attrib An optional dictionary, containing element attributes. # @param **extra Additional attributes, given as keyword arguments. # @see Element # @see SubElement # @see Comment # @see ProcessingInstruction class Element(object): # text...tail ## # (Attribute) Element tag. tag = None ## # (Attribute) Element attribute dictionary. Where possible, use # {@link #Element.get}, # {@link #Element.set}, # {@link #Element.keys}, and # {@link #Element.items} to access # element attributes. attrib = None ## # (Attribute) Text before first subelement. This is either a # string or the value None. Note that if there was no text, this # attribute may be either None or an empty string, depending on # the parser. text = None ## # (Attribute) Text after this element's end tag, but before the # next sibling element's start tag. This is either a string or # the value None. Note that if there was no text, this attribute # may be either None or an empty string, depending on the parser. tail = None # text after end tag, if any # constructor def __init__(self, tag, attrib={}, **extra): attrib = attrib.copy() attrib.update(extra) self.tag = tag self.attrib = attrib self._children = [] def __repr__(self): return "" % (repr(self.tag), id(self)) ## # Creates a new element object of the same type as this element. # # @param tag Element tag. # @param attrib Element attributes, given as a dictionary. # @return A new element instance. def makeelement(self, tag, attrib): return self.__class__(tag, attrib) ## # (Experimental) Copies the current element. This creates a # shallow copy; subelements will be shared with the original tree. # # @return A new element instance. def copy(self): elem = self.makeelement(self.tag, self.attrib) elem.text = self.text elem.tail = self.tail elem[:] = self return elem ## # Returns the number of subelements. Note that this only counts # full elements; to check if there's any content in an element, you # have to check both the length and the text attribute. # # @return The number of subelements. def __len__(self): return len(self._children) def __nonzero__(self): warnings.warn( "The behavior of this method will change in future versions. " "Use specific 'len(elem)' or 'elem is not None' test instead.", FutureWarning, stacklevel=2 ) return len(self._children) != 0 # emulate old behaviour, for now ## # Returns the given subelement, by index. # # @param index What subelement to return. # @return The given subelement. # @exception IndexError If the given element does not exist. def __getitem__(self, index): return self._children[index] ## # Replaces the given subelement, by index. # # @param index What subelement to replace. # @param element The new element value. # @exception IndexError If the given element does not exist. def __setitem__(self, index, element): # if isinstance(index, slice): # for elt in element: # assert iselement(elt) # else: # assert iselement(element) self._children[index] = element ## # Deletes the given subelement, by index. # # @param index What subelement to delete. # @exception IndexError If the given element does not exist. def __delitem__(self, index): del self._children[index] ## # Adds a subelement to the end of this element. In document order, # the new element will appear after the last existing subelement (or # directly after the text, if it's the first subelement), but before # the end tag for this element. # # @param element The element to add. def append(self, element): # assert iselement(element) self._children.append(element) ## # Appends subelements from a sequence. # # @param elements A sequence object with zero or more elements. # @since 1.3 def extend(self, elements): # for element in elements: # assert iselement(element) self._children.extend(elements) ## # Inserts a subelement at the given position in this element. # # @param index Where to insert the new subelement. def insert(self, index, element): # assert iselement(element) self._children.insert(index, element) ## # Removes a matching subelement. Unlike the find methods, # this method compares elements based on identity, not on tag # value or contents. To remove subelements by other means, the # easiest way is often to use a list comprehension to select what # elements to keep, and use slice assignment to update the parent # element. # # @param element What element to remove. # @exception ValueError If a matching element could not be found. def remove(self, element): # assert iselement(element) self._children.remove(element) ## # (Deprecated) Returns all subelements. The elements are returned # in document order. # # @return A list of subelements. # @defreturn list of Element instances def getchildren(self): warnings.warn( "This method will be removed in future versions. " "Use 'list(elem)' or iteration over elem instead.", DeprecationWarning, stacklevel=2 ) return self._children ## # Finds the first matching subelement, by tag name or path. # # @param path What element to look for. # @keyparam namespaces Optional namespace prefix map. # @return The first matching element, or None if no element was found. # @defreturn Element or None def find(self, path, namespaces=None): return ElementPath.find(self, path, namespaces) ## # Finds text for the first matching subelement, by tag name or path. # # @param path What element to look for. # @param default What to return if the element was not found. # @keyparam namespaces Optional namespace prefix map. # @return The text content of the first matching element, or the # default value no element was found. Note that if the element # is found, but has no text content, this method returns an # empty string. # @defreturn string def findtext(self, path, default=None, namespaces=None): return ElementPath.findtext(self, path, default, namespaces) ## # Finds all matching subelements, by tag name or path. # # @param path What element to look for. # @keyparam namespaces Optional namespace prefix map. # @return A list or other sequence containing all matching elements, # in document order. # @defreturn list of Element instances def findall(self, path, namespaces=None): return ElementPath.findall(self, path, namespaces) ## # Finds all matching subelements, by tag name or path. # # @param path What element to look for. # @keyparam namespaces Optional namespace prefix map. # @return An iterator or sequence containing all matching elements, # in document order. # @defreturn a generated sequence of Element instances def iterfind(self, path, namespaces=None): return ElementPath.iterfind(self, path, namespaces) ## # Resets an element. This function removes all subelements, clears # all attributes, and sets the text and tail attributes # to None. def clear(self): self.attrib.clear() self._children = [] self.text = self.tail = None ## # Gets an element attribute. Equivalent to attrib.get, but # some implementations may handle this a bit more efficiently. # # @param key What attribute to look for. # @param default What to return if the attribute was not found. # @return The attribute value, or the default value, if the # attribute was not found. # @defreturn string or None def get(self, key, default=None): return self.attrib.get(key, default) ## # Sets an element attribute. Equivalent to attrib[key] = value, # but some implementations may handle this a bit more efficiently. # # @param key What attribute to set. # @param value The attribute value. def set(self, key, value): self.attrib[key] = value ## # Gets a list of attribute names. The names are returned in an # arbitrary order (just like for an ordinary Python dictionary). # Equivalent to attrib.keys(). # # @return A list of element attribute names. # @defreturn list of strings def keys(self): return self.attrib.keys() ## # Gets element attributes, as a sequence. The attributes are # returned in an arbitrary order. Equivalent to attrib.items(). # # @return A list of (name, value) tuples for all attributes. # @defreturn list of (string, string) tuples def items(self): return self.attrib.items() ## # Creates a tree iterator. The iterator loops over this element # and all subelements, in document order, and returns all elements # with a matching tag. #

# If the tree structure is modified during iteration, new or removed # elements may or may not be included. To get a stable set, use the # list() function on the iterator, and loop over the resulting list. # # @param tag What tags to look for (default is to return all elements). # @return An iterator containing all the matching elements. # @defreturn iterator def iter(self, tag=None): if tag == "*": tag = None if tag is None or self.tag == tag: yield self for e in self._children: for e in e.iter(tag): yield e # compatibility def getiterator(self, tag=None): # Change for a DeprecationWarning in 1.4 warnings.warn( "This method will be removed in future versions. " "Use 'elem.iter()' or 'list(elem.iter())' instead.", PendingDeprecationWarning, stacklevel=2 ) return list(self.iter(tag)) ## # Creates a text iterator. The iterator loops over this element # and all subelements, in document order, and returns all inner # text. # # @return An iterator containing all inner text. # @defreturn iterator def itertext(self): tag = self.tag if not isinstance(tag, basestring) and tag is not None: return if self.text: yield self.text for e in self: for s in e.itertext(): yield s if e.tail: yield e.tail # compatibility _Element = _ElementInterface = Element ## # Subelement factory. This function creates an element instance, and # appends it to an existing element. #

# The element name, attribute names, and attribute values can be # either 8-bit ASCII strings or Unicode strings. # # @param parent The parent element. # @param tag The subelement name. # @param attrib An optional dictionary, containing element attributes. # @param **extra Additional attributes, given as keyword arguments. # @return An element instance. # @defreturn Element def SubElement(parent, tag, attrib={}, **extra): attrib = attrib.copy() attrib.update(extra) element = parent.makeelement(tag, attrib) parent.append(element) return element ## # Comment element factory. This factory function creates a special # element that will be serialized as an XML comment by the standard # serializer. #

# The comment string can be either an 8-bit ASCII string or a Unicode # string. # # @param text A string containing the comment string. # @return An element instance, representing a comment. # @defreturn Element def Comment(text=None): element = Element(Comment) element.text = text return element ## # PI element factory. This factory function creates a special element # that will be serialized as an XML processing instruction by the standard # serializer. # # @param target A string containing the PI target. # @param text A string containing the PI contents, if any. # @return An element instance, representing a PI. # @defreturn Element def ProcessingInstruction(target, text=None): element = Element(ProcessingInstruction) element.text = target if text: element.text = element.text + " " + text return element PI = ProcessingInstruction ## # QName wrapper. This can be used to wrap a QName attribute value, in # order to get proper namespace handling on output. # # @param text A string containing the QName value, in the form {uri}local, # or, if the tag argument is given, the URI part of a QName. # @param tag Optional tag. If given, the first argument is interpreted as # a URI, and this argument is interpreted as a local name. # @return An opaque object, representing the QName. class QName(object): def __init__(self, text_or_uri, tag=None): if tag: text_or_uri = "{%s}%s" % (text_or_uri, tag) self.text = text_or_uri def __str__(self): return self.text def __hash__(self): return hash(self.text) def __cmp__(self, other): if isinstance(other, QName): return cmp(self.text, other.text) return cmp(self.text, other) # -------------------------------------------------------------------- ## # ElementTree wrapper class. This class represents an entire element # hierarchy, and adds some extra support for serialization to and from # standard XML. # # @param element Optional root element. # @keyparam file Optional file handle or file name. If given, the # tree is initialized with the contents of this XML file. class ElementTree(object): def __init__(self, element=None, file=None): # assert element is None or iselement(element) self._root = element # first node if file: self.parse(file) ## # Gets the root element for this tree. # # @return An element instance. # @defreturn Element def getroot(self): return self._root ## # Replaces the root element for this tree. This discards the # current contents of the tree, and replaces it with the given # element. Use with care. # # @param element An element instance. def _setroot(self, element): # assert iselement(element) self._root = element ## # Loads an external XML document into this element tree. # # @param source A file name or file object. If a file object is # given, it only has to implement a read(n) method. # @keyparam parser An optional parser instance. If not given, the # standard {@link XMLParser} parser is used. # @return The document root element. # @defreturn Element # @exception ParseError If the parser fails to parse the document. def parse(self, source, parser=None): close_source = False if not hasattr(source, "read"): source = open(source, "rb") close_source = True try: if not parser: parser = XMLParser(target=TreeBuilder()) while 1: data = source.read(65536) if not data: break parser.feed(data) self._root = parser.close() return self._root finally: if close_source: source.close() ## # Creates a tree iterator for the root element. The iterator loops # over all elements in this tree, in document order. # # @param tag What tags to look for (default is to return all elements) # @return An iterator. # @defreturn iterator def iter(self, tag=None): # assert self._root is not None return self._root.iter(tag) # compatibility def getiterator(self, tag=None): # Change for a DeprecationWarning in 1.4 warnings.warn( "This method will be removed in future versions. " "Use 'tree.iter()' or 'list(tree.iter())' instead.", PendingDeprecationWarning, stacklevel=2 ) return list(self.iter(tag)) ## # Same as getroot().find(path), starting at the root of the # tree. # # @param path What element to look for. # @keyparam namespaces Optional namespace prefix map. # @return The first matching element, or None if no element was found. # @defreturn Element or None def find(self, path, namespaces=None): # assert self._root is not None if path[:1] == "/": path = "." + path warnings.warn( "This search is broken in 1.3 and earlier, and will be " "fixed in a future version. If you rely on the current " "behaviour, change it to %r" % path, FutureWarning, stacklevel=2 ) return self._root.find(path, namespaces) ## # Same as getroot().findtext(path), starting at the root of the tree. # # @param path What element to look for. # @param default What to return if the element was not found. # @keyparam namespaces Optional namespace prefix map. # @return The text content of the first matching element, or the # default value no element was found. Note that if the element # is found, but has no text content, this method returns an # empty string. # @defreturn string def findtext(self, path, default=None, namespaces=None): # assert self._root is not None if path[:1] == "/": path = "." + path warnings.warn( "This search is broken in 1.3 and earlier, and will be " "fixed in a future version. If you rely on the current " "behaviour, change it to %r" % path, FutureWarning, stacklevel=2 ) return self._root.findtext(path, default, namespaces) ## # Same as getroot().findall(path), starting at the root of the tree. # # @param path What element to look for. # @keyparam namespaces Optional namespace prefix map. # @return A list or iterator containing all matching elements, # in document order. # @defreturn list of Element instances def findall(self, path, namespaces=None): # assert self._root is not None if path[:1] == "/": path = "." + path warnings.warn( "This search is broken in 1.3 and earlier, and will be " "fixed in a future version. If you rely on the current " "behaviour, change it to %r" % path, FutureWarning, stacklevel=2 ) return self._root.findall(path, namespaces) ## # Finds all matching subelements, by tag name or path. # Same as getroot().iterfind(path). # # @param path What element to look for. # @keyparam namespaces Optional namespace prefix map. # @return An iterator or sequence containing all matching elements, # in document order. # @defreturn a generated sequence of Element instances def iterfind(self, path, namespaces=None): # assert self._root is not None if path[:1] == "/": path = "." + path warnings.warn( "This search is broken in 1.3 and earlier, and will be " "fixed in a future version. If you rely on the current " "behaviour, change it to %r" % path, FutureWarning, stacklevel=2 ) return self._root.iterfind(path, namespaces) ## # Writes the element tree to a file, as XML. # # @def write(file, **options) # @param file A file name, or a file object opened for writing. # @param **options Options, given as keyword arguments. # @keyparam encoding Optional output encoding (default is US-ASCII). # @keyparam xml_declaration Controls if an XML declaration should # be added to the file. Use False for never, True for always, # None for only if not US-ASCII or UTF-8. None is default. # @keyparam default_namespace Sets the default XML namespace (for "xmlns"). # @keyparam method Optional output method ("xml", "html", "text" or # "c14n"; default is "xml"). def write(self, file_or_filename, # keyword arguments encoding=None, xml_declaration=None, default_namespace=None, method=None): # assert self._root is not None if not method: method = "xml" elif method not in _serialize: # FIXME: raise an ImportError for c14n if ElementC14N is missing? raise ValueError("unknown method %r" % method) if hasattr(file_or_filename, "write"): file = file_or_filename else: file = open(file_or_filename, "wb") write = file.write if not encoding: if method == "c14n": encoding = "utf-8" else: encoding = "us-ascii" elif xml_declaration or (xml_declaration is None and encoding not in ("utf-8", "us-ascii")): if method == "xml": write("\n" % encoding) if method == "text": _serialize_text(write, self._root, encoding) else: qnames, namespaces = _namespaces( self._root, encoding, default_namespace ) serialize = _serialize[method] serialize(write, self._root, encoding, qnames, namespaces) if file_or_filename is not file: file.close() def write_c14n(self, file): # lxml.etree compatibility. use output method instead return self.write(file, method="c14n") # -------------------------------------------------------------------- # serialization support def _namespaces(elem, encoding, default_namespace=None): # identify namespaces used in this tree # maps qnames to *encoded* prefix:local names qnames = {None: None} # maps uri:s to prefixes namespaces = {} if default_namespace: namespaces[default_namespace] = "" def encode(text): return text.encode(encoding) def add_qname(qname): # calculate serialized qname representation try: if qname[:1] == "{": uri, tag = qname[1:].rsplit("}", 1) prefix = namespaces.get(uri) if prefix is None: prefix = _namespace_map.get(uri) if prefix is None: prefix = "ns%d" % len(namespaces) if prefix != "xml": namespaces[uri] = prefix if prefix: qnames[qname] = encode("%s:%s" % (prefix, tag)) else: qnames[qname] = encode(tag) # default element else: if default_namespace: # FIXME: can this be handled in XML 1.0? raise ValueError( "cannot use non-qualified names with " "default_namespace option" ) qnames[qname] = encode(qname) except TypeError: _raise_serialization_error(qname) # populate qname and namespaces table try: iterate = elem.iter except AttributeError: iterate = elem.getiterator # cET compatibility for elem in iterate(): tag = elem.tag if isinstance(tag, QName): if tag.text not in qnames: add_qname(tag.text) elif isinstance(tag, basestring): if tag not in qnames: add_qname(tag) elif tag is not None and tag is not Comment and tag is not PI: _raise_serialization_error(tag) for key, value in elem.items(): if isinstance(key, QName): key = key.text if key not in qnames: add_qname(key) if isinstance(value, QName) and value.text not in qnames: add_qname(value.text) text = elem.text if isinstance(text, QName) and text.text not in qnames: add_qname(text.text) return qnames, namespaces def _serialize_xml(write, elem, encoding, qnames, namespaces): tag = elem.tag text = elem.text if tag is Comment: write("" % _encode(text, encoding)) elif tag is ProcessingInstruction: write("" % _encode(text, encoding)) else: tag = qnames[tag] if tag is None: if text: write(_escape_cdata(text, encoding)) for e in elem: _serialize_xml(write, e, encoding, qnames, None) else: write("<" + tag) items = elem.items() if items or namespaces: if namespaces: for v, k in sorted(namespaces.items(), key=lambda x: x[1]): # sort on prefix if k: k = ":" + k write(" xmlns%s=\"%s\"" % ( k.encode(encoding), _escape_attrib(v, encoding) )) for k, v in sorted(items): # lexical order if isinstance(k, QName): k = k.text if isinstance(v, QName): v = qnames[v.text] else: v = _escape_attrib(v, encoding) write(" %s=\"%s\"" % (qnames[k], v)) if text or len(elem): write(">") if text: write(_escape_cdata(text, encoding)) for e in elem: _serialize_xml(write, e, encoding, qnames, None) write("") else: write(" />") if elem.tail: write(_escape_cdata(elem.tail, encoding)) HTML_EMPTY = ("area", "base", "basefont", "br", "col", "frame", "hr", "img", "input", "isindex", "link", "meta", "param") try: HTML_EMPTY = set(HTML_EMPTY) except NameError: pass def _serialize_html(write, elem, encoding, qnames, namespaces): tag = elem.tag text = elem.text if tag is Comment: write("" % _escape_cdata(text, encoding)) elif tag is ProcessingInstruction: write("" % _escape_cdata(text, encoding)) else: tag = qnames[tag] if tag is None: if text: write(_escape_cdata(text, encoding)) for e in elem: _serialize_html(write, e, encoding, qnames, None) else: write("<" + tag) items = elem.items() if items or namespaces: if namespaces: for v, k in sorted(namespaces.items(), key=lambda x: x[1]): # sort on prefix if k: k = ":" + k write(" xmlns%s=\"%s\"" % ( k.encode(encoding), _escape_attrib(v, encoding) )) for k, v in sorted(items): # lexical order if isinstance(k, QName): k = k.text if isinstance(v, QName): v = qnames[v.text] else: v = _escape_attrib_html(v, encoding) # FIXME: handle boolean attributes write(" %s=\"%s\"" % (qnames[k], v)) write(">") ltag = tag.lower() if text: if ltag == "script" or ltag == "style": write(_encode(text, encoding)) else: write(_escape_cdata(text, encoding)) for e in elem: _serialize_html(write, e, encoding, qnames, None) if ltag not in HTML_EMPTY: write("") if elem.tail: write(_escape_cdata(elem.tail, encoding)) def _serialize_text(write, elem, encoding): for part in elem.itertext(): write(part.encode(encoding)) if elem.tail: write(elem.tail.encode(encoding)) _serialize = { "xml": _serialize_xml, "html": _serialize_html, "text": _serialize_text, # this optional method is imported at the end of the module # "c14n": _serialize_c14n, } ## # Registers a namespace prefix. The registry is global, and any # existing mapping for either the given prefix or the namespace URI # will be removed. # # @param prefix Namespace prefix. # @param uri Namespace uri. Tags and attributes in this namespace # will be serialized with the given prefix, if at all possible. # @exception ValueError If the prefix is reserved, or is otherwise # invalid. def register_namespace(prefix, uri): if re.match("ns\d+$", prefix): raise ValueError("Prefix format reserved for internal use") for k, v in _namespace_map.items(): if k == uri or v == prefix: del _namespace_map[k] _namespace_map[uri] = prefix _namespace_map = { # "well-known" namespace prefixes "http://www.w3.org/XML/1998/namespace": "xml", "http://www.w3.org/1999/xhtml": "html", "http://www.w3.org/1999/02/22-rdf-syntax-ns#": "rdf", "http://schemas.xmlsoap.org/wsdl/": "wsdl", # xml schema "http://www.w3.org/2001/XMLSchema": "xs", "http://www.w3.org/2001/XMLSchema-instance": "xsi", # dublin core "http://purl.org/dc/elements/1.1/": "dc", } def _raise_serialization_error(text): raise TypeError( "cannot serialize %r (type %s)" % (text, type(text).__name__) ) def _encode(text, encoding): try: return text.encode(encoding, "xmlcharrefreplace") except (TypeError, AttributeError): _raise_serialization_error(text) def _escape_cdata(text, encoding): # escape character data try: # it's worth avoiding do-nothing calls for strings that are # shorter than 500 character, or so. assume that's, by far, # the most common case in most applications. if "&" in text: text = text.replace("&", "&") if "<" in text: text = text.replace("<", "<") if ">" in text: text = text.replace(">", ">") return text.encode(encoding, "xmlcharrefreplace") except (TypeError, AttributeError): _raise_serialization_error(text) def _escape_attrib(text, encoding): # escape attribute value try: if "&" in text: text = text.replace("&", "&") if "<" in text: text = text.replace("<", "<") if ">" in text: text = text.replace(">", ">") if "\"" in text: text = text.replace("\"", """) if "\n" in text: text = text.replace("\n", " ") return text.encode(encoding, "xmlcharrefreplace") except (TypeError, AttributeError): _raise_serialization_error(text) def _escape_attrib_html(text, encoding): # escape attribute value try: if "&" in text: text = text.replace("&", "&") if ">" in text: text = text.replace(">", ">") if "\"" in text: text = text.replace("\"", """) return text.encode(encoding, "xmlcharrefreplace") except (TypeError, AttributeError): _raise_serialization_error(text) # -------------------------------------------------------------------- ## # Generates a string representation of an XML element, including all # subelements. # # @param element An Element instance. # @keyparam encoding Optional output encoding (default is US-ASCII). # @keyparam method Optional output method ("xml", "html", "text" or # "c14n"; default is "xml"). # @return An encoded string containing the XML data. # @defreturn string def tostring(element, encoding=None, method=None): class dummy: pass data = [] file = dummy() file.write = data.append ElementTree(element).write(file, encoding, method=method) return "".join(data) ## # Generates a string representation of an XML element, including all # subelements. The string is returned as a sequence of string fragments. # # @param element An Element instance. # @keyparam encoding Optional output encoding (default is US-ASCII). # @keyparam method Optional output method ("xml", "html", "text" or # "c14n"; default is "xml"). # @return A sequence object containing the XML data. # @defreturn sequence # @since 1.3 def tostringlist(element, encoding=None, method=None): class dummy: pass data = [] file = dummy() file.write = data.append ElementTree(element).write(file, encoding, method=method) # FIXME: merge small fragments into larger parts return data ## # Writes an element tree or element structure to sys.stdout. This # function should be used for debugging only. #

# The exact output format is implementation dependent. In this # version, it's written as an ordinary XML file. # # @param elem An element tree or an individual element. def dump(elem): # debugging if not isinstance(elem, ElementTree): elem = ElementTree(elem) elem.write(sys.stdout) tail = elem.getroot().tail if not tail or tail[-1] != "\n": sys.stdout.write("\n") # -------------------------------------------------------------------- # parsing ## # Parses an XML document into an element tree. # # @param source A filename or file object containing XML data. # @param parser An optional parser instance. If not given, the # standard {@link XMLParser} parser is used. # @return An ElementTree instance def parse(source, parser=None): tree = ElementTree() tree.parse(source, parser) return tree ## # Parses an XML document into an element tree incrementally, and reports # what's going on to the user. # # @param source A filename or file object containing XML data. # @param events A list of events to report back. If omitted, only "end" # events are reported. # @param parser An optional parser instance. If not given, the # standard {@link XMLParser} parser is used. # @return A (event, elem) iterator. def iterparse(source, events=None, parser=None): close_source = False if not hasattr(source, "read"): source = open(source, "rb") close_source = True try: if not parser: parser = XMLParser(target=TreeBuilder()) return _IterParseIterator(source, events, parser, close_source) except: if close_source: source.close() raise class _IterParseIterator(object): def __init__(self, source, events, parser, close_source=False): self._file = source self._close_file = close_source self._events = [] self._index = 0 self._error = None self.root = self._root = None self._parser = parser # wire up the parser for event reporting parser = self._parser._parser append = self._events.append if events is None: events = ["end"] for event in events: if event == "start": try: parser.ordered_attributes = 1 parser.specified_attributes = 1 def handler(tag, attrib_in, event=event, append=append, start=self._parser._start_list): append((event, start(tag, attrib_in))) parser.StartElementHandler = handler except AttributeError: def handler(tag, attrib_in, event=event, append=append, start=self._parser._start): append((event, start(tag, attrib_in))) parser.StartElementHandler = handler elif event == "end": def handler(tag, event=event, append=append, end=self._parser._end): append((event, end(tag))) parser.EndElementHandler = handler elif event == "start-ns": def handler(prefix, uri, event=event, append=append): try: uri = (uri or "").encode("ascii") except UnicodeError: pass append((event, (prefix or "", uri or ""))) parser.StartNamespaceDeclHandler = handler elif event == "end-ns": def handler(prefix, event=event, append=append): append((event, None)) parser.EndNamespaceDeclHandler = handler else: raise ValueError("unknown event %r" % event) def next(self): try: while 1: try: item = self._events[self._index] self._index += 1 return item except IndexError: pass if self._error: e = self._error self._error = None raise e if self._parser is None: self.root = self._root break # load event buffer del self._events[:] self._index = 0 data = self._file.read(16384) if data: try: self._parser.feed(data) except SyntaxError as exc: self._error = exc else: self._root = self._parser.close() self._parser = None except: if self._close_file: self._file.close() raise if self._close_file: self._file.close() raise StopIteration def __iter__(self): return self ## # Parses an XML document from a string constant. This function can # be used to embed "XML literals" in Python code. # # @param source A string containing XML data. # @param parser An optional parser instance. If not given, the # standard {@link XMLParser} parser is used. # @return An Element instance. # @defreturn Element def XML(text, parser=None): if not parser: parser = XMLParser(target=TreeBuilder()) parser.feed(text) return parser.close() ## # Parses an XML document from a string constant, and also returns # a dictionary which maps from element id:s to elements. # # @param source A string containing XML data. # @param parser An optional parser instance. If not given, the # standard {@link XMLParser} parser is used. # @return A tuple containing an Element instance and a dictionary. # @defreturn (Element, dictionary) def XMLID(text, parser=None): if not parser: parser = XMLParser(target=TreeBuilder()) parser.feed(text) tree = parser.close() ids = {} for elem in tree.iter(): id = elem.get("id") if id: ids[id] = elem return tree, ids ## # Parses an XML document from a string constant. Same as {@link #XML}. # # @def fromstring(text) # @param source A string containing XML data. # @return An Element instance. # @defreturn Element fromstring = XML ## # Parses an XML document from a sequence of string fragments. # # @param sequence A list or other sequence containing XML data fragments. # @param parser An optional parser instance. If not given, the # standard {@link XMLParser} parser is used. # @return An Element instance. # @defreturn Element # @since 1.3 def fromstringlist(sequence, parser=None): if not parser: parser = XMLParser(target=TreeBuilder()) for text in sequence: parser.feed(text) return parser.close() # -------------------------------------------------------------------- ## # Generic element structure builder. This builder converts a sequence # of {@link #TreeBuilder.start}, {@link #TreeBuilder.data}, and {@link # #TreeBuilder.end} method calls to a well-formed element structure. #

# You can use this class to build an element structure using a custom XML # parser, or a parser for some other XML-like format. # # @param element_factory Optional element factory. This factory # is called to create new Element instances, as necessary. class TreeBuilder(object): def __init__(self, element_factory=None): self._data = [] # data collector self._elem = [] # element stack self._last = None # last element self._tail = None # true if we're after an end tag if element_factory is None: element_factory = Element self._factory = element_factory ## # Flushes the builder buffers, and returns the toplevel document # element. # # @return An Element instance. # @defreturn Element def close(self): assert len(self._elem) == 0, "missing end tags" assert self._last is not None, "missing toplevel element" return self._last def _flush(self): if self._data: if self._last is not None: text = "".join(self._data) if self._tail: assert self._last.tail is None, "internal error (tail)" self._last.tail = text else: assert self._last.text is None, "internal error (text)" self._last.text = text self._data = [] ## # Adds text to the current element. # # @param data A string. This should be either an 8-bit string # containing ASCII text, or a Unicode string. def data(self, data): self._data.append(data) ## # Opens a new element. # # @param tag The element name. # @param attrib A dictionary containing element attributes. # @return The opened element. # @defreturn Element def start(self, tag, attrs): self._flush() self._last = elem = self._factory(tag, attrs) if self._elem: self._elem[-1].append(elem) self._elem.append(elem) self._tail = 0 return elem ## # Closes the current element. # # @param tag The element name. # @return The closed element. # @defreturn Element def end(self, tag): self._flush() self._last = self._elem.pop() assert self._last.tag == tag,\ "end tag mismatch (expected %s, got %s)" % ( self._last.tag, tag) self._tail = 1 return self._last _sentinel = ['sentinel'] ## # Element structure builder for XML source data, based on the # expat parser. # # @keyparam target Target object. If omitted, the builder uses an # instance of the standard {@link #TreeBuilder} class. # @keyparam html Predefine HTML entities. This flag is not supported # by the current implementation. # @keyparam encoding Optional encoding. If given, the value overrides # the encoding specified in the XML file. # @see #ElementTree # @see #TreeBuilder class XMLParser(object): def __init__(self, html=_sentinel, target=None, encoding=None): if html is not _sentinel: warnings.warnpy3k( "The html argument of XMLParser() is deprecated", DeprecationWarning, stacklevel=2) try: from xml.parsers import expat except ImportError: try: import pyexpat as expat except ImportError: raise ImportError( "No module named expat; use SimpleXMLTreeBuilder instead" ) parser = expat.ParserCreate(encoding, "}") if target is None: target = TreeBuilder() # underscored names are provided for compatibility only self.parser = self._parser = parser self.target = self._target = target self._error = expat.error self._names = {} # name memo cache # callbacks parser.DefaultHandlerExpand = self._default parser.StartElementHandler = self._start parser.EndElementHandler = self._end parser.CharacterDataHandler = self._data # optional callbacks parser.CommentHandler = self._comment parser.ProcessingInstructionHandler = self._pi # let expat do the buffering, if supported try: self._parser.buffer_text = 1 except AttributeError: pass # use new-style attribute handling, if supported try: self._parser.ordered_attributes = 1 self._parser.specified_attributes = 1 parser.StartElementHandler = self._start_list except AttributeError: pass self._doctype = None self.entity = {} try: self.version = "Expat %d.%d.%d" % expat.version_info except AttributeError: pass # unknown def _raiseerror(self, value): err = ParseError(value) err.code = value.code err.position = value.lineno, value.offset raise err def _fixtext(self, text): # convert text string to ascii, if possible try: return text.encode("ascii") except UnicodeError: return text def _fixname(self, key): # expand qname, and convert name string to ascii, if possible try: name = self._names[key] except KeyError: name = key if "}" in name: name = "{" + name self._names[key] = name = self._fixtext(name) return name def _start(self, tag, attrib_in): fixname = self._fixname fixtext = self._fixtext tag = fixname(tag) attrib = {} for key, value in attrib_in.items(): attrib[fixname(key)] = fixtext(value) return self.target.start(tag, attrib) def _start_list(self, tag, attrib_in): fixname = self._fixname fixtext = self._fixtext tag = fixname(tag) attrib = {} if attrib_in: for i in range(0, len(attrib_in), 2): attrib[fixname(attrib_in[i])] = fixtext(attrib_in[i+1]) return self.target.start(tag, attrib) def _data(self, text): return self.target.data(self._fixtext(text)) def _end(self, tag): return self.target.end(self._fixname(tag)) def _comment(self, data): try: comment = self.target.comment except AttributeError: pass else: return comment(self._fixtext(data)) def _pi(self, target, data): try: pi = self.target.pi except AttributeError: pass else: return pi(self._fixtext(target), self._fixtext(data)) def _default(self, text): prefix = text[:1] if prefix == "&": # deal with undefined entities try: self.target.data(self.entity[text[1:-1]]) except KeyError: from xml.parsers import expat err = expat.error( "undefined entity %s: line %d, column %d" % (text, self._parser.ErrorLineNumber, self._parser.ErrorColumnNumber) ) err.code = 11 # XML_ERROR_UNDEFINED_ENTITY err.lineno = self._parser.ErrorLineNumber err.offset = self._parser.ErrorColumnNumber raise err elif prefix == "<" and text[:9] == "": self._doctype = None return text = text.strip() if not text: return self._doctype.append(text) n = len(self._doctype) if n > 2: type = self._doctype[1] if type == "PUBLIC" and n == 4: name, type, pubid, system = self._doctype elif type == "SYSTEM" and n == 3: name, type, system = self._doctype pubid = None else: return if pubid: pubid = pubid[1:-1] if hasattr(self.target, "doctype"): self.target.doctype(name, pubid, system[1:-1]) elif self.doctype != self._XMLParser__doctype: # warn about deprecated call self._XMLParser__doctype(name, pubid, system[1:-1]) self.doctype(name, pubid, system[1:-1]) self._doctype = None ## # (Deprecated) Handles a doctype declaration. # # @param name Doctype name. # @param pubid Public identifier. # @param system System identifier. def doctype(self, name, pubid, system): """This method of XMLParser is deprecated.""" warnings.warn( "This method of XMLParser is deprecated. Define doctype() " "method on the TreeBuilder target.", DeprecationWarning, ) # sentinel, if doctype is redefined in a subclass __doctype = doctype ## # Feeds data to the parser. # # @param data Encoded data. def feed(self, data): try: self._parser.Parse(data, 0) except self._error, v: self._raiseerror(v) ## # Finishes feeding data to the parser. # # @return An element structure. # @defreturn Element def close(self): try: self._parser.Parse("", 1) # end of data except self._error, v: self._raiseerror(v) tree = self.target.close() del self.target, self._parser # get rid of circular references return tree # compatibility XMLTreeBuilder = XMLParser # workaround circular import. try: from ElementC14N import _serialize_c14n _serialize["c14n"] = _serialize_c14n except ImportError: pass PK!xr)__pycache__/ElementInclude.cpython-36.pycnu[3 \@sPddlZddlmZdZedZedZGdddeZd d d Zd d dZ dS)N) ElementTreez!{http://www.w3.org/2001/XInclude}includeZfallbackc@s eZdZdS)FatalIncludeErrorN)__name__ __module__ __qualname__r r 0/usr/lib64/python3.6/xml/etree/ElementInclude.pyr>src Cs\|dkr.t|d}tj|j}WdQRXn*|s6d}t|d|d}|j}WdQRX|S)NxmlrbzUTF-8r)encoding)openrparseZgetrootread)hrefrrfiledatar r r default_loaderMs rcCsp|dkr t}d}xX|t|krj||}|jtkr:|jd}|jdd}|dkr|||}|dkrvtd||ftj|}|jr|jpd|j|_|||<n|dkr,||||jd}|dkrtd||f|r||d }|jpd||jpd|_n|jpd||jpd|_||=qn td |n&|jt krVtd |jn t |||d }qWdS) Nrrrr zcannot load %r as %rtextrrz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r)) rlentagXINCLUDE_INCLUDEgetrcopytailrXINCLUDE_FALLBACKr)elemloaderierrZnoderr r r rcsF           )N)N) rrrZXINCLUDErr SyntaxErrorrrrr r r r 3s  PK!Ib}&__pycache__/ElementPath.cpython-36.pycnu[3 \&@sddlZejdZdddZddZddZd d Zd d Zd dZddZ ddZ eeee ee dZ iZ GdddZ dddZd ddZd!ddZd"ddZdS)#Nz\('[^']*'|\"[^\"]*\"|::|//?|\.\.|\(\)|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@=\s]+)|\s+c csxtj|D]}|d}|r|ddkrd|kry6|jdd\}}|sJt|dd|||ffVWqtk rtd|YqXq |Vq WdS)Nr{:z{%s}%sz!prefix %r not found in prefix map)xpath_tokenizer_refindallsplitKeyError SyntaxError)pattern namespacestokentagprefixZurir-/usr/lib64/python3.6/xml/etree/ElementPath.pyxpath_tokenizerIsrcCsF|j}|dkrBi|_}x(|jjD]}x|D] }|||<q.Wq$W|S)N) parent_maprootiter)contextrperrrget_parent_mapWs  rcs|dfdd}|S)Nrc3s0x*|D]"}x|D]}|jkr|VqWqWdS)N)r )rresultelemr)r rrselectbs   zprepare_child..selectr)nextr rr)r r prepare_child`s rcCs dd}|S)Ncssx|D]}|EdHqWdS)Nr)rrrrrrrjs zprepare_star..selectr)rr rrrr prepare_starisrcCs dd}|S)Ncss|EdHdS)Nr)rrrrrrpszprepare_self..selectr)rr rrrr prepare_selfosrc s\y |}Wntk rdSX|ddkr2dn|dsD|dntdfdd}|S)Nr*rzinvalid descendantc3s4x.|D]&}x |jD]}||k r|VqWqWdS)N)r)rrrr)r rrrs z"prepare_descendant..select) StopIterationr )rr rr)r rprepare_descendantts    r"cCs dd}|S)NcssDt|}i}x2|D]*}||kr||}||krd||<|VqWdS)N)r)rrrZ result_maprparentrrrrs zprepare_parent..selectr)rr rrrrprepare_parents r$c s*g}g}xy |}Wntk r(dSX|ddkr8P|drh|ddddkrhd|dddf}|j|dpvd|j|dq Wdj|}|dkr|dfd d }|S|d kr|d|dfd d }|S|dkrtjd |d r|dfdd }|S|dkrVtjd |d rV|d|dfdd }|S|dkst|dkst|dkr|dkrt|dddkrtdnl|ddkrtd|dkr yt|ddWntk rtdYnXdkrtdndfdd }|StddS) Nr]rz'"'-z@-c3s&x |D]}|jdk r|VqWdS)N)get)rrr)keyrrrs z!prepare_predicate..selectz@-='c3s&x |D]}|jkr|VqWdS)N)r))rrr)r*valuerrrs z\-?\d+$c3s&x |D]}|jdk r|VqWdS)N)find)rrr)r rrrs z-='c3s@x:|D]2}x,|jD]}dj|jkr|VPqWqWdS)Nr()rjoinZitertext)rrrr)r r+rrrs  z-()z-()-zXPath position >= 1 expectedZlastzunsupported functionzunsupported expressionz)XPath offset from last() must be negativec 3sbt|}xT|D]L}y.||}t|j|j}||kr>|VWqttfk rXYqXqWdS)N)rlistrr IndexErrorr)rrrrr#Zelems)indexrrrs   zinvalid predicater2r2r2)r!appendr-rematchintr ValueError)rr Z signatureZ predicaterr)r1r*r r+rprepare_predicatesd            r9)r(r .z..z//[c@seZdZdZddZdS)_SelectorContextNcCs ||_dS)N)r)selfrrrr__init__sz_SelectorContext.__init__)__name__ __module__ __qualname__rr>rrrrr<sr<c !Csh||dkrdntt|jf}|dddkr8|d}y t|}Wntk r:ttdkrjtj|dddkrtdtt ||j }y |}Wnt k rdSXg}xvy|j t |d||Wnt k rtdYnXy|}|ddkr|}Wqt k r(PYqXqW|t|<YnX|g}t|}x|D]} | ||}qPW|S) Nr/r dz#cannot use absolute path on elementrz invalid pathr2)tuplesorteditems_cacherlenclearr rr__next__r!r4opsr<) rpathr Z cache_keyZselectorrr rrrrrriterfindsD      rMcCstt|||dS)N)rrM)rrLr rrrr,)sr,cCstt|||S)N)r/rM)rrLr rrrr/src Cs4ytt|||}|jpdStk r.|SXdS)Nr()rrMtextr!)rrLdefaultr rrrfindtext5s  rP)N)N)N)N)NN)r5compilerrrrrrr"r$r9rKrGr<rMr,rrPrrrr;s,    Y )  PK!A3}})__pycache__/__init__.cpython-36.opt-2.pycnu[3 \D@sdS)Nrrr*/usr/lib64/python3.6/xml/etree/__init__.pysPK!tH,__pycache__/ElementTree.cpython-36.opt-1.pycnu[3 \@sHdZddddddddd d d d d ddddddddddgZdZddlZddlZddlZddlZddlZddlZddl m Z Gdd d e Z ddZ GdddZifd dZd^d!dZd_d"d ZeZGd#d d ZGd$ddZejd%d&Zd`d'd(Zd)d*ZdaZy eeZWnek r"YnXd8d9Zd:d;Zeeed<Zd=dZd>d?d@dAdBdCdDdEZ e e_ dFdGZ!dHdIZ"dJdKZ#dLdMZ$dbdNdOdPdZ%GdQdRdRej&Z'dcdNdOdSdZ(dTdZ)dddUd Z*dedVdZ+GdWddZ,dfdXdZ-dgdYdZ.e-Z/dhdZdZ0Gd[ddZ1Gd\ddZ2yeZ3dd]l4TWne5k rBYnXdS)iaLightweight XML support for Python. XML is an inherently hierarchical data format, and the most natural way to represent it is with a tree. This module has two classes for this purpose: 1. ElementTree represents the whole XML document as a tree and 2. Element represents a single node in this tree. Interactions with the whole document (reading and writing to/from files) are usually done on the ElementTree level. Interactions with a single XML element and its sub-elements are done on the Element level. Element is a flexible container object designed to store hierarchical data structures in memory. It can be described as a cross between a list and a dictionary. Each Element has a number of properties associated with it: 'tag' - a string containing the element's name. 'attributes' - a Python dictionary storing the element's attributes. 'text' - a string containing the element's text content. 'tail' - an optional string containing text after the element's end tag. And a number of child elements stored in a Python sequence. To create an element instance, use the Element constructor, or the SubElement factory function. You can also use the ElementTree class to wrap an element structure and convert it to and from XML. CommentdumpElement ElementTree fromstringfromstringlist iselement iterparseparse ParseErrorPIProcessingInstructionQName SubElementtostring tostringlist TreeBuilderVERSIONXMLXMLID XMLParser XMLPullParserregister_namespacez1.3.0N) ElementPathc@seZdZdZdS)r zAn error when parsing an XML document. In addition to its exception value, a ParseError contains two extra attributes: 'code' - the specific exception code 'position' - the line and column of the error N)__name__ __module__ __qualname____doc__rr-/usr/lib64/python3.6/xml/etree/ElementTree.pyr hscCs t|dS)z2Return True if *element* appears to be an Element.tag)hasattr)elementrrr rvsc@s eZdZdZdZdZdZdZifddZddZ ddZ d d Z d d Z d dZ ddZddZddZddZddZddZddZddZdd Zd9d!d"Zd:d#d$Zd;d%d&Zdd3d4Z d?d5d6Z!d7d8Z"dS)@rahAn XML element. This class is the reference implementation of the Element interface. An element's length is its number of subelements. That means if you want to check if an element is truly empty, you should check BOTH its length AND its text attribute. The element tag, attribute names, and attribute values can be either bytes or strings. *tag* is the element name. *attrib* is an optional dictionary containing element attributes. *extra* are additional element attributes given as keyword arguments. Example form: text...tail NcKsDt|tstd|jjf|j}|j|||_||_g|_ dS)Nzattrib must be dict, not %s) isinstancedict TypeError __class__rcopyupdater!attrib _children)selfr!r*extrarrr __init__s  zElement.__init__cCsd|jj|jt|fS)Nz<%s %r at %#x>)r'rr!id)r,rrr __repr__szElement.__repr__cCs |j||S)zCreate a new element with the same type. *tag* is a string containing the element name. *attrib* is a dictionary containing the element attributes. Do not call this method, use the SubElement factory function instead. )r')r,r!r*rrr makeelements zElement.makeelementcCs0|j|j|j}|j|_|j|_||dd<|S)zReturn copy of current element. This creates a shallow copy. Subelements will be shared with the original tree. N)r1r!r*texttail)r,elemrrr r(s  z Element.copycCs t|jS)N)lenr+)r,rrr __len__szElement.__len__cCstjdtddt|jdkS)NzyThe behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.) stacklevelr)warningswarn FutureWarningr5r+)r,rrr __bool__s zElement.__bool__cCs |j|S)N)r+)r,indexrrr __getitem__szElement.__getitem__cCs||j|<dS)N)r+)r,r=r#rrr __setitem__szElement.__setitem__cCs |j|=dS)N)r+)r,r=rrr __delitem__szElement.__delitem__cCs|j||jj|dS)aAdd *subelement* to the end of this element. The new element will appear in document order after the last existing subelement (or directly after the text, if it's the first subelement), but before the end tag for this element. N)_assert_is_elementr+append)r, subelementrrr rBs zElement.appendcCs(x|D]}|j|qW|jj|dS)zkAppend subelements from a sequence. *elements* is a sequence with zero or more elements. N)rAr+extend)r,elementsr#rrr rDs zElement.extendcCs|j||jj||dS)z(Insert *subelement* at position *index*.N)rAr+insert)r,r=rCrrr rFs zElement.insertcCs t|tstdt|jdS)Nzexpected an Element, not %s)r$ _Element_Pyr&typer)r,errr rAs zElement._assert_is_elementcCs|jj|dS)aRemove matching subelement. Unlike the find methods, this method compares elements based on identity, NOT ON tag value or contents. To remove subelements by other means, the easiest way is to use a list comprehension to select what elements to keep, and then use slice assignment to update the parent element. ValueError is raised if a matching element could not be found. N)r+remove)r,rCrrr rJs zElement.removecCstjdtdd|jS)z`(Deprecated) Return all subelements. Elements are returned in document order. zaThis method will be removed in future versions. Use 'list(elem)' or iteration over elem instead.r7)r8)r9r:DeprecationWarningr+)r,rrr getchildrens zElement.getchildrencCstj|||S)aFind first matching element by tag name or path. *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found. )rfind)r,path namespacesrrr rM!s z Element.findcCstj||||S)aFind text for first matching element by tag name or path. *path* is a string having either an element tag or an XPath, *default* is the value to return if the element was not found, *namespaces* is an optional mapping from namespace prefix to full name. Return text content of first matching element, or default value if none was found. Note that if an element is found having no text content, the empty string is returned. )rfindtext)r,rNdefaultrOrrr rP,s zElement.findtextcCstj|||S)aFind all matching subelements by tag name or path. *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Returns list containing all matching elements in document order. )rfindall)r,rNrOrrr rR:s zElement.findallcCstj|||S)a Find all matching subelements by tag name or path. *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return an iterable yielding all matching elements in document order. )riterfind)r,rNrOrrr rSEs zElement.iterfindcCs |jjg|_d|_|_dS)zReset element. This function removes all subelements, clears all attributes, and sets the text and tail attributes to None. N)r*clearr+r2r3)r,rrr rTPs z Element.clearcCs|jj||S)agGet element attribute. Equivalent to attrib.get, but some implementations may handle this a bit more efficiently. *key* is what attribute to look for, and *default* is what to return if the attribute was not found. Returns a string containing the attribute value, or the default if attribute was not found. )r*get)r,keyrQrrr rU[s z Element.getcCs||j|<dS)zSet element attribute. Equivalent to attrib[key] = value, but some implementations may handle this a bit more efficiently. *key* is what attribute to set, and *value* is the attribute value to set it to. N)r*)r,rVvaluerrr sethsz Element.setcCs |jjS)zGet list of attribute names. Names are returned in an arbitrary order, just like an ordinary Python dict. Equivalent to attrib.keys() )r*keys)r,rrr rYrsz Element.keyscCs |jjS)zGet element attributes as a sequence. The attributes are returned in arbitrary order. Equivalent to attrib.items(). Return a list of (name, value) tuples. )r*items)r,rrr rZ{s z Element.itemsccsH|dkr d}|dks|j|kr$|Vx|jD]}|j|EdHq,WdS)aCreate tree iterator. The iterator loops over the element and all subelements in document order, returning all elements with a matching tag. If the tree structure is modified during iteration, new or removed elements may or may not be included. To get a stable set, use the list() function on the iterator, and loop over the resulting list. *tag* is what tags to look for (default is to return all elements) Return an iterator containing all the matching elements. *N)r!r+iter)r,r!rIrrr r\s  z Element.itercCstjdtddt|j|S)NzbThis method will be removed in future versions. Use 'elem.iter()' or 'list(elem.iter())' instead.r7)r8)r9r:PendingDeprecationWarninglistr\)r,r!rrr getiterators zElement.getiteratorccs^|j}t|t r|dk rdS|j}|r.|Vx*|D]"}|jEdH|j}|r4|Vq4WdS)zCreate text iterator. The iterator loops over the element and all subelements in document order, returning all inner text. N)r!r$strr2itertextr3)r,r!trIrrr ras zElement.itertext)N)NN)N)N)N)N)N)#rrrrr!r*r2r3r.r0r1r(r6r<r>r?r@rBrDrFrArJrLrMrPrRrSrTrUrXrYrZr\r_rarrrr r{s@            cKs,|j}|j||j||}|j||S)aSubelement factory which creates an element instance, and appends it to an existing parent. The element tag, attribute names, and attribute values can be either bytes or Unicode strings. *parent* is the parent element, *tag* is the subelements name, *attrib* is an optional directory containing element attributes, *extra* are additional attributes given as keyword arguments. )r(r)r1rB)parentr!r*r-r#rrr rs    cCstt}||_|S)zComment element factory. This function creates a special element which the standard serializer serializes as an XML comment. *text* is a string containing the comment string. )rrr2)r2r#rrr rs cCs&tt}||_|r"|jd||_|S)a*Processing Instruction element factory. This function creates a special element which the standard serializer serializes as an XML comment. *target* is a string containing the processing instruction, *text* is a string containing the processing instruction contents, if any.  )rr r2)targetr2r#rrr r s c@sZeZdZdZdddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ dS)r aQualified name wrapper. This class can be used to wrap a QName attribute value in order to get proper namespace handing on output. *text_or_uri* is a string containing the QName value either in the form {uri}local, or if the tag argument is given, the URI part of a QName. *tag* is an optional argument which if given, will make the first argument (text_or_uri) be interpreted as a URI, and this argument (tag) be interpreted as a local name. NcCs|rd||f}||_dS)Nz{%s}%s)r2)r,Z text_or_urir!rrr r.s zQName.__init__cCs|jS)N)r2)r,rrr __str__sz QName.__str__cCsd|jj|jfS)Nz<%s %r>)r'rr2)r,rrr r0szQName.__repr__cCs t|jS)N)hashr2)r,rrr __hash__szQName.__hash__cCs t|tr|j|jkS|j|kS)N)r$r r2)r,otherrrr __le__s  z QName.__le__cCs t|tr|j|jkS|j|kS)N)r$r r2)r,rirrr __lt__ s  z QName.__lt__cCs t|tr|j|jkS|j|kS)N)r$r r2)r,rirrr __ge__s  z QName.__ge__cCs t|tr|j|jkS|j|kS)N)r$r r2)r,rirrr __gt__s  z QName.__gt__cCs t|tr|j|jkS|j|kS)N)r$r r2)r,rirrr __eq__s  z QName.__eq__)N) rrrrr.rfr0rhrjrkrlrmrnrrrr r s  c@seZdZdZdddZddZddZdd d Zdd d Zd d dZ d!ddZ d"ddZ d#ddZ d$ddZ d%ddddZddZdS)&ra%An XML element hierarchy. This class also provides support for serialization to and from standard XML. *element* is an optional root element node, *file* is an optional file handle or file name of an XML file whose contents will be used to initialize the tree with. NcCs||_|r|j|dS)N)_rootr )r,r#filerrr r.)szElementTree.__init__cCs|jS)z!Return root element of this tree.)ro)r,rrr getroot/szElementTree.getrootcCs ||_dS)zReplace root element of this tree. This will discard the current contents of the tree and replace it with the given element. Use with care! N)ro)r,r#rrr _setroot3szElementTree._setrootc Csd}t|dst|d}d}zZ|dkrHt}t|drH|j||_|jSx|jd}|sZP|j|qJW|j|_|jS|r|jXdS)a=Load external XML document into element tree. *source* is a file name or file object, *parser* is an optional parser instance that defaults to XMLParser. ParseError is raised if the parser fails to parse the document. Returns the root element of the given source document. FreadrbTN _parse_wholei)r"openrrurorsfeedclose)r,sourceparser close_sourcedatarrr r =s&       zElementTree.parsecCs |jj|S)zCreate and return tree iterator for the root element. The iterator loops over all elements in this tree, in document order. *tag* is a string with the tag name to iterate over (default is to return all elements). )ror\)r,r!rrr r\bs zElementTree.itercCstjdtddt|j|S)NzbThis method will be removed in future versions. Use 'tree.iter()' or 'list(tree.iter())' instead.r7)r8)r9r:r]r^r\)r,r!rrr r_os zElementTree.getiteratorcCs:|dddkr,d|}tjd|tdd|jj||S)a\Find first matching element by tag name or path. Same as getroot().find(path), which is Element.find() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found. Nr/.zThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rr7)r8)r9r:r;rorM)r,rNrOrrr rMxs  zElementTree.findcCs<|dddkr,d|}tjd|tdd|jj|||S)aeFind first matching element by tag name or path. Same as getroot().findtext(path), which is Element.findtext() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found. Nrr}r~zThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rr7)r8)r9r:r;rorP)r,rNrQrOrrr rPs  zElementTree.findtextcCs:|dddkr,d|}tjd|tdd|jj||S)aaFind all matching subelements by tag name or path. Same as getroot().findall(path), which is Element.findall(). *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return list containing all matching elements in document order. Nrr}r~zThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rr7)r8)r9r:r;rorR)r,rNrOrrr rRs  zElementTree.findallcCs:|dddkr,d|}tjd|tdd|jj||S)agFind all matching subelements by tag name or path. Same as getroot().iterfind(path), which is element.iterfind() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return an iterable yielding all matching elements in document order. Nrr}r~zThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rr7)r8)r9r:r;rorS)r,rNrOrrr rSs  zElementTree.iterfindT)short_empty_elementscCs|s d}n|tkrtd||s4|dkr0d}nd}|j}t||}|dkr|sd|dkr|d kr|} |dkrddl} | j} |d | f|d krt||jn,t|j|\} } t|} | ||j| | |d WdQRXdS) aWrite element tree to a file as XML. Arguments: *file_or_filename* -- file name or a file object opened for writing *encoding* -- the output encoding (default: US-ASCII) *xml_declaration* -- bool indicating if an XML declaration should be added to the output. If None, an XML declaration is added if encoding IS NOT either of: US-ASCII, UTF-8, or Unicode *default_namespace* -- sets the default XML namespace (for "xmlns") *method* -- either "xml" (default), "html, "text", or "c14n" *short_empty_elements* -- controls the formatting of elements that contain no content. If True (default) they are emitted as a single self-closed tag, otherwise they are emitted as a pair of start/end tags xmlzunknown method %rc14nutf-8us-asciiNunicoderz$ r2)r)rrr) _serialize ValueErrorlower _get_writerlocalegetpreferredencoding_serialize_textro _namespaces)r,file_or_filenameencodingZxml_declarationdefault_namespacemethodrZ enc_lowerwriteZdeclared_encodingrqnamesrOZ serializerrr rs2     zElementTree.writecCs|j|ddS)Nr)r)r)r,rprrr write_c14n szElementTree.write_c14n)NN)N)N)N)N)NN)N)N)NNNN)rrrrr.rqrrr r\r_rMrPrRrSrrrrrr rs"   %    5ccs"y |j}WnPtk rZ|dkr.t|d}nt|d|dd}||jVWdQRXYnX|dkrl|Vntj}t|tjr|}nft|tjrtj |}|j |j nBtj}dd|_ ||_y|j |_ |j|_Wntk rYnXtj||ddd}|j |j |jVWdQRXdS) Nrwxmlcharrefreplace)rerrorscSsdS)NTrrrrr 3sz_get_writer.. )rrnewline)rAttributeErrorrv contextlib ExitStackr$ioBufferedIOBase RawIOBaseBufferedWritercallbackdetachwritableseekabletell TextIOWrapper)rrrrpstackrrr rs>         rcsddiird<fdd}x|jD]}|j}t|tr\|jkr||jn.add_qname) r\r!r$r r2r`rr rrZ)r4rrr!rVrWr2r)rrOrr rEs4      rc Ks|j}|j}|tkr$|d|n|tkr<|d|nv||}|dkr|r\|t|x|D]}t|||d|dqbWn2|d|t|j} | s|rD|rx@t|jdddD](\} } | rd| } |d | t | fqWxZt| D]N\} } t | t r | j} t | t r$|| j} nt | } |d || | fqW|s\t |s\| r|d |rv|t|x |D]}t|||d|dq|W|d |d n|d |j r|t|j dS)Nz z)r.)rV:z xmlns%s="%s"z %s="%s">z)r!r2rr _escape_cdata_serialize_xmlr^rZsorted_escape_attribr$r r5r3) rr4rrOrkwargsr!r2rIrZvkrrr rsT             rareabasebasefontbrcolframehrimginputisindexlinkmetaparamc Ks|j}|j}|tkr(|dt|n|tkrD|dt|n|||}|dkr|rd|t|x|D]}t|||dqjWn<|d|t|j}|s|rH|rx@t|jdddD](\} } | rd| } |d| t | fqWxZt|D]N\} } t | t r| j} t | t r(|| j} nt | } |d || | fqW|d |j } |r| d ksr| d kr|||n |t|x|D]}t|||dqW| tkr|d |d |jr|t|jdS)Nz zrcSs|dS)Nrr)rrrr rsz!_serialize_html..)rVrz xmlns%s="%s"z %s="%s"rZscriptZstylez|jdd}|Sttfk r`t|YnXdS)N&z&rz<rz>)replacer&rr)r2rrr r$s   rc Csyd|kr|jdd}d|kr*|jdd}d|kr>|jdd}d|krR|jdd}d |krf|jd d }d |krz|jd d }d |kr|jd d }d |kr|jd d}|Sttfk rt|YnXdS)Nrz&rz<rz>"z"z r z  z )rr&rr)r2rrr r4s(        rc Csfy@d|kr|jdd}d|kr*|jdd}d|kr>|jdd}|Sttfk r`t|YnXdS)Nrz&rz>rz")rr&rr)r2rrr rPs   rT)rcCs6|dkrtjntj}t|j||||d|jS)aGenerate string representation of XML element. All subelements are included. If encoding is "unicode", a string is returned. Otherwise a bytestring is returned. *element* is an Element instance, *encoding* is an optional output encoding defaulting to US-ASCII, *method* is an optional output which can be one of "xml" (default), "html", "text" or "c14n". Returns an (optionally) encoded string containing the XML data. r)rr)rStringIOBytesIOrrgetvalue)r#rrrstreamrrr r_sc@s8eZdZdZddZddZddZdd Zd d Zd S) _ListDataStreamz7An auxiliary stream accumulating into a list reference.cCs ||_dS)N)lst)r,rrrr r.tsz_ListDataStream.__init__cCsdS)NTr)r,rrr rwsz_ListDataStream.writablecCsdS)NTr)r,rrr rzsz_ListDataStream.seekablecCs|jj|dS)N)rrB)r,brrr r}sz_ListDataStream.writecCs t|jS)N)r5r)r,rrr rsz_ListDataStream.tellN) rrrrr.rrrrrrrr rrs rcCs&g}t|}t|j||||d|S)N)rr)rrr)r#rrrrrrrr rs cCsNt|tst|}|jtjdd|jj}| s>|ddkrJtjjddS)a#Write element tree or element structure to sys.stdout. This function should be used for debugging only. *elem* is either an ElementTree, or a single Element. The exact output format is implementation dependent. In this version, it's written as an ordinary XML file. r)rrrN)r$rrsysstdoutrqr3)r4r3rrr rs  cCst}|j|||S)zParse XML document into element tree. *source* is a filename or file object containing XML data, *parser* is an optional parser instance defaulting to XMLParser. Return an ElementTree instance. )rr )ryrztreerrr r s  csdt||dfddGfdddtj}|d_~dtds`td d S) aJIncrementally parse XML document into ElementTree. This class also reports what's going on to the user based on the *events* it is initialized with. The supported events are the strings "start", "end", "start-ns" and "end-ns" (the "ns" events are used to get detailed namespace information). If *events* is omitted, only "end" events are reported. *source* is a filename or file object containing XML data, *events* is a list of events to report back, *parser* is an optional parser instance. Returns an iterator providing (event, elem) pairs. )events_parserc 3sbzNx,jEdHjd}|s"Pj|qWj}jEdH|_Wdr\jXdS)Nii@) read_eventsrsrw_close_and_return_rootrootrx)r|r)r{it pullparserryrr iterators  ziterparse..iteratorcseZdZjZdS)z$iterparse..IterParseIteratorN)rrr__next__r)rrr IterParseIteratorsrNFrsrtT)r collectionsIteratorrr"rv)ryrrzrr)r{rrrryr rs   c@s<eZdZd ddddZddZddZd d Zd d ZdS)rN)rcCs<tj|_|pttd|_|dkr(d}|jj|j|dS)N)reend)r)rdeque _events_queuerrr _setevents)r,rrrrr r.s  zXMLPullParser.__init__cCsZ|jdkrtd|rVy|jj|Wn.tk rT}z|jj|WYdd}~XnXdS)zFeed encoded data to parser.Nz!feed() called after end of stream)rrrw SyntaxErrorrrB)r,r|excrrr rws zXMLPullParser.feedcCs|jj}d|_|S)N)rrx)r,rrrr rs z$XMLPullParser._close_and_return_rootcCs |jdS)zFinish feeding data to parser. Unlike XMLParser, does not return the root element. Use read_events() to consume elements from XMLPullParser. N)r)r,rrr rxszXMLPullParser.closeccs2|j}x&|r,|j}t|tr$|q|VqWdS)zReturn an iterator over currently available (event, elem) pairs. Events are consumed from the internal event queue as they are retrieved from the iterator. N)rpopleftr$ Exception)r,reventrrr rs  zXMLPullParser.read_events)N)rrrr.rwrrxrrrrr rs   cCs"|sttd}|j||jS)aParse XML document from string constant. This function can be used to embed "XML Literals" in Python code. *text* is a string containing XML data, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an Element instance. )re)rrrwrx)r2rzrrr rs   cCsV|sttd}|j||j}i}x&|jD]}|jd}|r0|||<q0W||fS)aParse XML document from string constant for its IDs. *text* is a string containing XML data, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an (Element, dict) tuple, in which the dict maps element id:s to elements. )rer/)rrrwrxr\rU)r2rzrZidsr4r/rrr r&s     cCs0|sttd}x|D]}|j|qW|jS)zParse XML document from sequence of string fragments. *sequence* is a list of other sequence, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an Element instance. )re)rrrwrx)Zsequencerzr2rrr r>s   c@sBeZdZdZdddZddZddZd d Zd d Zd dZ dS)raGeneric element structure builder. This builder converts a sequence of start, data, and end method calls to a well-formed element structure. You can use this class to build an element structure using a custom XML parser, or a parser for some other XML-like format. *element_factory* is an optional element factory which is called to create new Element instances, as necessary. NcCs.g|_g|_d|_d|_|dkr$t}||_dS)N)_data_elem_last_tailr_factory)r,Zelement_factoryrrr r.]szTreeBuilder.__init__cCs|jS)z;Flush builder buffers and return toplevel document Element.)r)r,rrr rxfszTreeBuilder.closecCs>|jr:|jdk r4dj|j}|jr,||j_n||j_g|_dS)Nr)rrjoinrr3r2)r,r2rrr _flushls   zTreeBuilder._flushcCs|jj|dS)zAdd text to current element.N)rrB)r,r|rrr r|xszTreeBuilder.datacCsF|j|j|||_}|jr0|jdj||jj|d|_|S)zOpen new element and return it. *tag* is the element name, *attrs* is a dict containing element attributes. rrr)rrrrrBr)r,r!Zattrsr4rrr start|s zTreeBuilder.startcCs |j|jj|_d|_|jS)zOClose and return current Element. *tag* is the element name. r)rrpoprr)r,r!rrr rs zTreeBuilder.end)N) rrrrr.rxrr|rrrrrr rPs   c@sfeZdZdZdddZddZdd Zd d Zd d ZddZ ddZ ddZ e Z ddZ ddZdS)raElement structure builder for XML source data based on the expat parser. *html* are predefined HTML entities (deprecated and not supported), *target* is an optional target object which defaults to an instance of the standard TreeBuilder class, *encoding* is an optional encoding string which if given, overrides the encoding specified in the XML file: http://www.iana.org/assignments/character-sets rNcCs<yddlm}Wn>tk rNy ddl}Wntk rHtdYnXYnX|j|d}|dkrjt}||_|_||_|_ |j |_ i|_ |j |_t|dr|j|_t|dr|j|_t|dr|j|_t|dr|j|_t|d r|j|_d |_d |_d |_d|_i|_yd |j|_ Wnt!k r6YnXdS) Nr)expatz7No module named expat; use SimpleXMLTreeBuilder insteadrrrr|commentpirzExpat %d.%d.%d)" xml.parsersr ImportErrorZpyexpatZ ParserCreaterrzrre_targeterror_error_names_defaultZDefaultHandlerExpandr"_startStartElementHandler_endEndElementHandlerr|ZCharacterDataHandlerrZCommentHandlerrZProcessingInstructionHandlerZ buffer_textordered_attributesspecified_attributes_doctypeentity version_infoversionr)r,rrerrrzrrr r.sF         zXMLParser.__init__cCs|j}|j}x|D]}|dkrDd|_d|_|||jfdd}||_q|dkrf|||jfdd}||_q|dkr||fdd}||_q|d kr||fd d}||_ qt d |qWdS) NrrcSs|||||fdS)Nr)r!Z attrib_inrrBrrrr handlersz%XMLParser._setevents..handlerrcSs||||fdS)Nr)r!rrBrrrr rszstart-nscSs|||p d|pdffdS)Nrr)rrrrBrrr rszend-nscSs||dfdS)Nr)rrrBrrr rszunknown event %r) rrBr rr r r r ZStartNamespaceDeclHandlerZEndNamespaceDeclHandlerr)r,Z events_queueZevents_to_reportrzrBZ event_namerrrr rs( zXMLParser._seteventscCs&t|}|j|_|j|jf|_|dS)N)r codelinenooffsetZposition)r,rWerrrrr _raiseerrorszXMLParser._raiseerrorc CsFy|j|}Wn2tk r@|}d|kr2d|}||j|<YnX|S)Nrr)rKeyError)r,rVnamerrr _fixnameszXMLParser._fixnamecCsV|j}||}i}|rHx0tdt|dD]}||d||||<q(W|jj||S)Nrr7r)rranger5rer)r,r!Z attr_listZfixnamer*irrr r szXMLParser._startcCs|jj|j|S)N)rerr)r,r!rrr r szXMLParser._endc Cs|dd}|dkry |jj}Wntk r4dSXy||j|ddWnZtk rddlm}|jd||jj |jj f}d|_ |jj |_ |jj |_ |YnXnD|dkr|ddd krg|_n"|jdk r|d krd|_dS|j}|sdS|jj|t|j}|d kr|jd}|d krb|d krb|j\}}} } | r| dd} n*|dkr|dkr|j\}}} d} ndSt|jdr|jj|| | ddn:|j|jkr|j|| | dd|j|| | ddd|_dS)Nrrr)rz'undefined entity %s: line %d, column %d r z "s) A   0t4 =2 2  05   KU PK!#}P-__pycache__/cElementTree.cpython-36.opt-2.pycnu[3 \R@s ddlTdS))*N)Zxml.etree.ElementTreerr./usr/lib64/python3.6/xml/etree/cElementTree.pysPK!xr/__pycache__/ElementInclude.cpython-36.opt-2.pycnu[3 \@sPddlZddlmZdZedZedZGdddeZd d d Zd d dZ dS)N) ElementTreez!{http://www.w3.org/2001/XInclude}includeZfallbackc@s eZdZdS)FatalIncludeErrorN)__name__ __module__ __qualname__r r 0/usr/lib64/python3.6/xml/etree/ElementInclude.pyr>src Cs\|dkr.t|d}tj|j}WdQRXn*|s6d}t|d|d}|j}WdQRX|S)NxmlrbzUTF-8r)encoding)openrparseZgetrootread)hrefrrfiledatar r r default_loaderMs rcCsp|dkr t}d}xX|t|krj||}|jtkr:|jd}|jdd}|dkr|||}|dkrvtd||ftj|}|jr|jpd|j|_|||<n|dkr,||||jd}|dkrtd||f|r||d }|jpd||jpd|_n|jpd||jpd|_||=qn td |n&|jt krVtd |jn t |||d }qWdS) Nrrrr zcannot load %r as %rtextrrz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r)) rlentagXINCLUDE_INCLUDEgetrcopytailrXINCLUDE_FALLBACKr)elemloaderierrZnoderr r r rcsF           )N)N) rrrZXINCLUDErr SyntaxErrorrrrr r r r 3s  PK!xr/__pycache__/ElementInclude.cpython-36.opt-1.pycnu[3 \@sPddlZddlmZdZedZedZGdddeZd d d Zd d dZ dS)N) ElementTreez!{http://www.w3.org/2001/XInclude}includeZfallbackc@s eZdZdS)FatalIncludeErrorN)__name__ __module__ __qualname__r r 0/usr/lib64/python3.6/xml/etree/ElementInclude.pyr>src Cs\|dkr.t|d}tj|j}WdQRXn*|s6d}t|d|d}|j}WdQRX|S)NxmlrbzUTF-8r)encoding)openrparseZgetrootread)hrefrrfiledatar r r default_loaderMs rcCsp|dkr t}d}xX|t|krj||}|jtkr:|jd}|jdd}|dkr|||}|dkrvtd||ftj|}|jr|jpd|j|_|||<n|dkr,||||jd}|dkrtd||f|r||d }|jpd||jpd|_n|jpd||jpd|_||=qn td |n&|jt krVtd |jn t |||d }qWdS) Nrrrr zcannot load %r as %rtextrrz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r)) rlentagXINCLUDE_INCLUDEgetrcopytailrXINCLUDE_FALLBACKr)elemloaderierrZnoderr r r rcsF           )N)N) rrrZXINCLUDErr SyntaxErrorrrrr r r r 3s  PK!Ib},__pycache__/ElementPath.cpython-36.opt-1.pycnu[3 \&@sddlZejdZdddZddZddZd d Zd d Zd dZddZ ddZ eeee ee dZ iZ GdddZ dddZd ddZd!ddZd"ddZdS)#Nz\('[^']*'|\"[^\"]*\"|::|//?|\.\.|\(\)|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@=\s]+)|\s+c csxtj|D]}|d}|r|ddkrd|kry6|jdd\}}|sJt|dd|||ffVWqtk rtd|YqXq |Vq WdS)Nr{:z{%s}%sz!prefix %r not found in prefix map)xpath_tokenizer_refindallsplitKeyError SyntaxError)pattern namespacestokentagprefixZurir-/usr/lib64/python3.6/xml/etree/ElementPath.pyxpath_tokenizerIsrcCsF|j}|dkrBi|_}x(|jjD]}x|D] }|||<q.Wq$W|S)N) parent_maprootiter)contextrperrrget_parent_mapWs  rcs|dfdd}|S)Nrc3s0x*|D]"}x|D]}|jkr|VqWqWdS)N)r )rresultelemr)r rrselectbs   zprepare_child..selectr)nextr rr)r r prepare_child`s rcCs dd}|S)Ncssx|D]}|EdHqWdS)Nr)rrrrrrrjs zprepare_star..selectr)rr rrrr prepare_starisrcCs dd}|S)Ncss|EdHdS)Nr)rrrrrrpszprepare_self..selectr)rr rrrr prepare_selfosrc s\y |}Wntk rdSX|ddkr2dn|dsD|dntdfdd}|S)Nr*rzinvalid descendantc3s4x.|D]&}x |jD]}||k r|VqWqWdS)N)r)rrrr)r rrrs z"prepare_descendant..select) StopIterationr )rr rr)r rprepare_descendantts    r"cCs dd}|S)NcssDt|}i}x2|D]*}||kr||}||krd||<|VqWdS)N)r)rrrZ result_maprparentrrrrs zprepare_parent..selectr)rr rrrrprepare_parents r$c s*g}g}xy |}Wntk r(dSX|ddkr8P|drh|ddddkrhd|dddf}|j|dpvd|j|dq Wdj|}|dkr|dfd d }|S|d kr|d|dfd d }|S|dkrtjd |d r|dfdd }|S|dkrVtjd |d rV|d|dfdd }|S|dkst|dkst|dkr|dkrt|dddkrtdnl|ddkrtd|dkr yt|ddWntk rtdYnXdkrtdndfdd }|StddS) Nr]rz'"'-z@-c3s&x |D]}|jdk r|VqWdS)N)get)rrr)keyrrrs z!prepare_predicate..selectz@-='c3s&x |D]}|jkr|VqWdS)N)r))rrr)r*valuerrrs z\-?\d+$c3s&x |D]}|jdk r|VqWdS)N)find)rrr)r rrrs z-='c3s@x:|D]2}x,|jD]}dj|jkr|VPqWqWdS)Nr()rjoinZitertext)rrrr)r r+rrrs  z-()z-()-zXPath position >= 1 expectedZlastzunsupported functionzunsupported expressionz)XPath offset from last() must be negativec 3sbt|}xT|D]L}y.||}t|j|j}||kr>|VWqttfk rXYqXqWdS)N)rlistrr IndexErrorr)rrrrr#Zelems)indexrrrs   zinvalid predicater2r2r2)r!appendr-rematchintr ValueError)rr Z signatureZ predicaterr)r1r*r r+rprepare_predicatesd            r9)r(r .z..z//[c@seZdZdZddZdS)_SelectorContextNcCs ||_dS)N)r)selfrrrr__init__sz_SelectorContext.__init__)__name__ __module__ __qualname__rr>rrrrr<sr<c !Csh||dkrdntt|jf}|dddkr8|d}y t|}Wntk r:ttdkrjtj|dddkrtdtt ||j }y |}Wnt k rdSXg}xvy|j t |d||Wnt k rtdYnXy|}|ddkr|}Wqt k r(PYqXqW|t|<YnX|g}t|}x|D]} | ||}qPW|S) Nr/r dz#cannot use absolute path on elementrz invalid pathr2)tuplesorteditems_cacherlenclearr rr__next__r!r4opsr<) rpathr Z cache_keyZselectorrr rrrrrriterfindsD      rMcCstt|||dS)N)rrM)rrLr rrrr,)sr,cCstt|||S)N)r/rM)rrLr rrrr/src Cs4ytt|||}|jpdStk r.|SXdS)Nr()rrMtextr!)rrLdefaultr rrrfindtext5s  rP)N)N)N)N)NN)r5compilerrrrrrr"r$r9rKrGr<rMr,rrPrrrr;s,    Y )  PK!#}P'__pycache__/cElementTree.cpython-36.pycnu[3 \R@s ddlTdS))*N)Zxml.etree.ElementTreerr./usr/lib64/python3.6/xml/etree/cElementTree.pysPK!1bmm,__pycache__/ElementTree.cpython-36.opt-2.pycnu[3 \@sDdddddddddd d d d d dddddddddgZdZddlZddlZddlZddlZddlZddlZddlm Z Gdd d e Z ddZ GdddZ ifdd Zd]d dZd^d!d ZeZGd"d d ZGd#ddZejd$d%Zd_d&d'Zd(d)Zd`Zy eeZWnek rYnXd7d8Zd9d:Zeeed;Zdd?d@dAdBdCdDZee_dEdFZ dGdHZ!dIdJZ"dKdLZ#dadMdNdOdZ$GdPdQdQej%Z&dbdMdNdRdZ'dSdZ(dcdTdZ)dddUdZ*GdVddZ+dedWdZ,dfdXdZ-e,Z.dgdYdZ/GdZddZ0Gd[ddZ1ye Z2dd\l3TWne4k r>YnXdS)hCommentdumpElement ElementTree fromstringfromstringlist iselement iterparseparse ParseErrorPIProcessingInstructionQName SubElementtostring tostringlist TreeBuilderVERSIONXMLXMLID XMLParser XMLPullParserregister_namespacez1.3.0N) ElementPathc@s eZdZdS)r N)__name__ __module__ __qualname__rr-/usr/lib64/python3.6/xml/etree/ElementTree.pyr hs cCs t|dS)Ntag)hasattr)elementrrrrvsc@seZdZdZdZdZdZifddZddZddZ dd Z d d Z d d Z ddZ ddZddZddZddZddZddZddZddZd8d d!Zd9d"d#Zd:d$d%Zd;d&d'Zd(d)Zdd4d5Z d6d7Z!dS)?rNcKsDt|tstd|jjf|j}|j|||_||_g|_ dS)Nzattrib must be dict, not %s) isinstancedict TypeError __class__rcopyupdater attrib _children)selfr r)extrarrr__init__s  zElement.__init__cCsd|jj|jt|fS)Nz<%s %r at %#x>)r&rr id)r+rrr__repr__szElement.__repr__cCs |j||S)N)r&)r+r r)rrr makeelements zElement.makeelementcCs0|j|j|j}|j|_|j|_||dd<|S)N)r0r r)texttail)r+elemrrrr's  z Element.copycCs t|jS)N)lenr*)r+rrr__len__szElement.__len__cCstjdtddt|jdkS)NzyThe behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.) stacklevelr)warningswarn FutureWarningr4r*)r+rrr__bool__s zElement.__bool__cCs |j|S)N)r*)r+indexrrr __getitem__szElement.__getitem__cCs||j|<dS)N)r*)r+r<r"rrr __setitem__szElement.__setitem__cCs |j|=dS)N)r*)r+r<rrr __delitem__szElement.__delitem__cCs|j||jj|dS)N)_assert_is_elementr*append)r+ subelementrrrrAs zElement.appendcCs(x|D]}|j|qW|jj|dS)N)r@r*extend)r+elementsr"rrrrCs zElement.extendcCs|j||jj||dS)N)r@r*insert)r+r<rBrrrrEs zElement.insertcCs t|tstdt|jdS)Nzexpected an Element, not %s)r# _Element_Pyr%typer)r+errrr@s zElement._assert_is_elementcCs|jj|dS)N)r*remove)r+rBrrrrIs zElement.removecCstjdtdd|jS)NzaThis method will be removed in future versions. Use 'list(elem)' or iteration over elem instead.r6)r7)r8r9DeprecationWarningr*)r+rrr getchildrens zElement.getchildrencCstj|||S)N)rfind)r+path namespacesrrrrL!s z Element.findcCstj||||S)N)rfindtext)r+rMdefaultrNrrrrO,s zElement.findtextcCstj|||S)N)rfindall)r+rMrNrrrrQ:s zElement.findallcCstj|||S)N)riterfind)r+rMrNrrrrREs zElement.iterfindcCs |jjg|_d|_|_dS)N)r)clearr*r1r2)r+rrrrSPs z Element.clearcCs|jj||S)N)r)get)r+keyrPrrrrT[s z Element.getcCs||j|<dS)N)r))r+rUvaluerrrsethsz Element.setcCs |jjS)N)r)keys)r+rrrrXrsz Element.keyscCs |jjS)N)r)items)r+rrrrY{s z Element.itemsccsH|dkr d}|dks|j|kr$|Vx|jD]}|j|EdHq,WdS)N*)r r*iter)r+r rHrrrr[s  z Element.itercCstjdtddt|j|S)NzbThis method will be removed in future versions. Use 'elem.iter()' or 'list(elem.iter())' instead.r6)r7)r8r9PendingDeprecationWarninglistr[)r+r rrr getiterators zElement.getiteratorccs^|j}t|t r|dk rdS|j}|r.|Vx*|D]"}|jEdH|j}|r4|Vq4WdS)N)r r#strr1itertextr2)r+r trHrrrr`s zElement.itertext)N)NN)N)N)N)N)N)"rrrr r)r1r2r-r/r0r'r5r;r=r>r?rArCrEr@rIrKrLrOrQrRrSrTrWrXrYr[r^r`rrrrr{s>            cKs,|j}|j||j||}|j||S)N)r'r(r0rA)parentr r)r,r"rrrrs    cCstt}||_|S)N)rrr1)r1r"rrrrs cCs&tt}||_|r"|jd||_|S)N )rr r1)targetr1r"rrrr s c@sVeZdZdddZddZddZdd Zd d Zd d ZddZ ddZ ddZ dS)r NcCs|rd||f}||_dS)Nz{%s}%s)r1)r+Z text_or_urir rrrr-s zQName.__init__cCs|jS)N)r1)r+rrr__str__sz QName.__str__cCsd|jj|jfS)Nz<%s %r>)r&rr1)r+rrrr/szQName.__repr__cCs t|jS)N)hashr1)r+rrr__hash__szQName.__hash__cCs t|tr|j|jkS|j|kS)N)r#r r1)r+otherrrr__le__s  z QName.__le__cCs t|tr|j|jkS|j|kS)N)r#r r1)r+rhrrr__lt__ s  z QName.__lt__cCs t|tr|j|jkS|j|kS)N)r#r r1)r+rhrrr__ge__s  z QName.__ge__cCs t|tr|j|jkS|j|kS)N)r#r r1)r+rhrrr__gt__s  z QName.__gt__cCs t|tr|j|jkS|j|kS)N)r#r r1)r+rhrrr__eq__s  z QName.__eq__)N) rrrr-rer/rgrirjrkrlrmrrrrr s c@seZdZdddZddZddZddd Zdd d Zdd d Zd ddZ d!ddZ d"ddZ d#ddZ d$ddddZ ddZdS)%rNcCs||_|r|j|dS)N)_rootr )r+r"filerrrr-)szElementTree.__init__cCs|jS)N)rn)r+rrrgetroot/szElementTree.getrootcCs ||_dS)N)rn)r+r"rrr_setroot3szElementTree._setrootc Csd}t|dst|d}d}zZ|dkrHt}t|drH|j||_|jSx|jd}|sZP|j|qJW|j|_|jS|r|jXdS)NFreadrbT _parse_wholei)r!openrrtrnrrfeedclose)r+sourceparser close_sourcedatarrrr =s&       zElementTree.parsecCs |jj|S)N)rnr[)r+r rrrr[bs zElementTree.itercCstjdtddt|j|S)NzbThis method will be removed in future versions. Use 'tree.iter()' or 'list(tree.iter())' instead.r6)r7)r8r9r\r]r[)r+r rrrr^os zElementTree.getiteratorcCs:|dddkr,d|}tjd|tdd|jj||S)Nr/.zThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rr6)r7)r8r9r:rnrL)r+rMrNrrrrLxs  zElementTree.findcCs<|dddkr,d|}tjd|tdd|jj|||S)Nrr|r}zThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rr6)r7)r8r9r:rnrO)r+rMrPrNrrrrOs  zElementTree.findtextcCs:|dddkr,d|}tjd|tdd|jj||S)Nrr|r}zThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rr6)r7)r8r9r:rnrQ)r+rMrNrrrrQs  zElementTree.findallcCs:|dddkr,d|}tjd|tdd|jj||S)Nrr|r}zThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rr6)r7)r8r9r:rnrR)r+rMrNrrrrRs  zElementTree.iterfindT)short_empty_elementscCs|s d}n|tkrtd||s4|dkr0d}nd}|j}t||}|dkr|sd|dkr|d kr|} |dkrddl} | j} |d| f|d krt||jn,t|j|\} } t|} | ||j| | |d WdQRXdS) Nxmlzunknown method %rc14nutf-8us-asciiunicoderz$ r1)r~)rrr) _serialize ValueErrorlower _get_writerlocalegetpreferredencoding_serialize_textrn _namespaces)r+file_or_filenameencodingZxml_declarationdefault_namespacemethodr~Z enc_lowerwriteZdeclared_encodingrqnamesrNZ serializerrrrs2     zElementTree.writecCs|j|ddS)Nr)r)r)r+rorrr write_c14n szElementTree.write_c14n)NN)N)N)N)N)NN)N)N)NNNN)rrrr-rprqr r[r^rLrOrQrRrrrrrrrs   %    5ccs"y |j}WnPtk rZ|dkr.t|d}nt|d|dd}||jVWdQRXYnX|dkrl|Vntj}t|tjr|}nft|tjrtj |}|j |j nBtj}dd|_ ||_y|j |_ |j|_Wntk rYnXtj||ddd}|j |j |jVWdQRXdS) Nrwxmlcharrefreplace)rerrorscSsdS)NTrrrrr3sz_get_writer.. )rrnewline)rAttributeErrorru contextlib ExitStackr#ioBufferedIOBase RawIOBaseBufferedWritercallbackdetachwritableseekabletell TextIOWrapper)rrrrostackrrrrs>         rcsddiird<fdd}x|jD]}|j}t|tr\|jkr||jn.add_qname) r[r r#r r1r_rr rrY)r3rrr rUrVr1r)rrNrrrEs4      rc Ks|j}|j}|tkr$|d|n|tkr<|d|nv||}|dkr|r\|t|x|D]}t|||d|dqbWn2|d|t|j} | s|rD|rx@t|jdddD](\} } | rd| } |d | t | fqWxZt| D]N\} } t | t r | j} t | t r$|| j} nt | } |d || | fqW|s\t |s\| r|d |rv|t|x |D]}t|||d|dq|W|d |d n|d |j r|t|j dS)Nz z)r~.)rU:z xmlns%s="%s"z %s="%s">z)r r1rr _escape_cdata_serialize_xmlr]rYsorted_escape_attribr#r r4r2) rr3rrNr~kwargsr r1rHrYvkrrrrsT             rareabasebasefontbrcolframehrimginputisindexlinkmetaparamc Ks|j}|j}|tkr(|dt|n|tkrD|dt|n|||}|dkr|rd|t|x|D]}t|||dqjWn<|d|t|j}|s|rH|rx@t|jdddD](\} } | rd| } |d| t | fqWxZt|D]N\} } t | t r| j} t | t r(|| j} nt | } |d || | fqW|d |j } |r| d ksr| d kr|||n |t|x|D]}t|||dqW| tkr|d |d |jr|t|jdS)Nz zrcSs|dS)Nrr)rrrrrsz!_serialize_html..)rUrz xmlns%s="%s"z %s="%s"rZscriptZstylez|jdd}|Sttfk r`t|YnXdS)N&z&rz<rz>)replacer%rr)r1rrrr$s   rc Csyd|kr|jdd}d|kr*|jdd}d|kr>|jdd}d|krR|jdd}d |krf|jd d }d |krz|jd d }d |kr|jd d }d |kr|jd d}|Sttfk rt|YnXdS)Nrz&rz<rz>"z"z r z  z )rr%rr)r1rrrr4s(        rc Csfy@d|kr|jdd}d|kr*|jdd}d|kr>|jdd}|Sttfk r`t|YnXdS)Nrz&rz>rz")rr%rr)r1rrrrPs   rT)r~cCs6|dkrtjntj}t|j||||d|jS)Nr)rr~)rStringIOBytesIOrrgetvalue)r"rrr~streamrrrr_sc@s4eZdZddZddZddZddZd d Zd S) _ListDataStreamcCs ||_dS)N)lst)r+rrrrr-tsz_ListDataStream.__init__cCsdS)NTr)r+rrrrwsz_ListDataStream.writablecCsdS)NTr)r+rrrrzsz_ListDataStream.seekablecCs|jj|dS)N)rrA)r+brrrr}sz_ListDataStream.writecCs t|jS)N)r4r)r+rrrrsz_ListDataStream.tellN)rrrr-rrrrrrrrrrs rcCs&g}t|}t|j||||d|S)N)rr~)rrr)r"rrr~rrrrrrs cCsNt|tst|}|jtjdd|jj}| s>|ddkrJtjjddS)Nr)rrr)r#rrsysstdoutrpr2)r3r2rrrrs  cCst}|j|||S)N)rr )rxrytreerrrr s  csdt||dfddGfdddtj}|d_~dtds`tdd S) N)events_parserc 3sbzNx,jEdHjd}|s"Pj|qWj}jEdH|_Wdr\jXdS)Nii@) read_eventsrrrv_close_and_return_rootrootrw)r{r)rzit pullparserrxrriterators  ziterparse..iteratorcseZdZjZdS)z$iterparse..IterParseIteratorN)rrr__next__r)rrrIterParseIteratorsrFrrrsT)r collectionsIteratorrr!ru)rxrryrr)rzrrrrxrrs   c@s<eZdZd ddddZddZddZd d Zd d ZdS)rN)rcCs<tj|_|pttd|_|dkr(d}|jj|j|dS)N)rdend)r)rdeque _events_queuerrr _setevents)r+rrrrrr-s  zXMLPullParser.__init__cCsZ|jdkrtd|rVy|jj|Wn.tk rT}z|jj|WYdd}~XnXdS)Nz!feed() called after end of stream)rrrv SyntaxErrorrrA)r+r{excrrrrvs zXMLPullParser.feedcCs|jj}d|_|S)N)rrw)r+rrrrrs z$XMLPullParser._close_and_return_rootcCs |jdS)N)r)r+rrrrwszXMLPullParser.closeccs2|j}x&|r,|j}t|tr$|q|VqWdS)N)rpopleftr# Exception)r+reventrrrrs  zXMLPullParser.read_events)N)rrrr-rvrrwrrrrrrs   cCs"|sttd}|j||jS)N)rd)rrrvrw)r1ryrrrrs   cCsV|sttd}|j||j}i}x&|jD]}|jd}|r0|||<q0W||fS)N)rdr.)rrrvrwr[rT)r1ryrZidsr3r.rrrr&s     cCs0|sttd}x|D]}|j|qW|jS)N)rd)rrrvrw)Zsequenceryr1rrrr>s   c@s>eZdZdddZddZddZdd Zd d Zd d ZdS)rNcCs.g|_g|_d|_d|_|dkr$t}||_dS)N)_data_elem_last_tailr_factory)r+Zelement_factoryrrrr-]szTreeBuilder.__init__cCs|jS)N)r)r+rrrrwfszTreeBuilder.closecCs>|jr:|jdk r4dj|j}|jr,||j_n||j_g|_dS)Nr)rrjoinrr2r1)r+r1rrr_flushls   zTreeBuilder._flushcCs|jj|dS)N)rrA)r+r{rrrr{xszTreeBuilder.datacCsF|j|j|||_}|jr0|jdj||jj|d|_|S)Nrrr)rrrrrAr)r+r Zattrsr3rrrstart|s zTreeBuilder.startcCs |j|jj|_d|_|jS)Nr)rrpoprr)r+r rrrrs zTreeBuilder.end)N) rrrr-rwrr{rrrrrrrPs   c@sbeZdZdddZddZddZd d Zd d Zd dZddZ ddZ e Z ddZ ddZ dS)rrNcCs<yddlm}Wn>tk rNy ddl}Wntk rHtdYnXYnX|j|d}|dkrjt}||_|_||_|_ |j |_ i|_ |j |_t|dr|j|_t|dr|j|_t|dr|j|_t|dr|j|_t|d r|j|_d |_d |_d |_d|_i|_yd |j|_ Wnt!k r6YnXdS) Nr)expatz7No module named expat; use SimpleXMLTreeBuilder insteadrrrr{commentpirzExpat %d.%d.%d)" xml.parsersr ImportErrorZpyexpatZ ParserCreaterryrrd_targeterror_error_names_defaultZDefaultHandlerExpandr!_startStartElementHandler_endEndElementHandlerr{ZCharacterDataHandlerrZCommentHandlerrZProcessingInstructionHandlerZ buffer_textordered_attributesspecified_attributes_doctypeentity version_infoversionr)r+rrdrrryrrrr-sF         zXMLParser.__init__cCs|j}|j}x|D]}|dkrDd|_d|_|||jfdd}||_q|dkrf|||jfdd}||_q|dkr||fdd}||_q|d kr||fd d}||_ qt d |qWdS) NrrcSs|||||fdS)Nr)r Z attrib_inrrArrrrhandlersz%XMLParser._setevents..handlerrcSs||||fdS)Nr)r rrArrrrrszstart-nscSs|||p d|pdffdS)Nrr)rrrrArrrrszend-nscSs||dfdS)Nr)rrrArrrrszunknown event %r) rrAr r rr r r ZStartNamespaceDeclHandlerZEndNamespaceDeclHandlerr)r+Z events_queueZevents_to_reportryrAZ event_namerrrrrs( zXMLParser._seteventscCs&t|}|j|_|j|jf|_|dS)N)r codelinenooffsetZposition)r+rVerrrrr _raiseerrorszXMLParser._raiseerrorc CsFy|j|}Wn2tk r@|}d|kr2d|}||j|<YnX|S)Nrr)rKeyError)r+rUnamerrr_fixnameszXMLParser._fixnamecCsV|j}||}i}|rHx0tdt|dD]}||d||||<q(W|jj||S)Nrr6r)rranger4rdr)r+r Z attr_listZfixnamer)irrrrszXMLParser._startcCs|jj|j|S)N)rdrr)r+r rrrr szXMLParser._endc Cs|dd}|dkry |jj}Wntk r4dSXy||j|ddWnZtk rddlm}|jd||jj |jj f}d|_ |jj |_ |jj |_ |YnXnD|dkr|ddd krg|_n"|jdk r|d krd|_dS|j}|sdS|jj|t|j}|d kr|jd}|d krb|d krb|j\}}} } | r| dd} n*|dkr|dkr|j\}}} d} ndSt|jdr|jj|| | ddn:|j|jkr|j|| | dd|j|| | ddd|_dS)Nrrr)rz'undefined entity %s: line %d, column %d r z Ks A   0t4 =2 2  05   KU PK!#}P-__pycache__/cElementTree.cpython-36.opt-1.pycnu[3 \R@s ddlTdS))*N)Zxml.etree.ElementTreerr./usr/lib64/python3.6/xml/etree/cElementTree.pysPK!.&__pycache__/ElementTree.cpython-36.pycnu[3 \@sHdZddddddddd d d d d ddddddddddgZdZddlZddlZddlZddlZddlZddlZddl m Z Gdd d e Z ddZ GdddZifd dZd^d!dZd_d"d ZeZGd#d d ZGd$ddZejd%d&Zd`d'd(Zd)d*ZdaZy eeZWnek r"YnXd8d9Zd:d;Zeeed<Zd=dZd>d?d@dAdBdCdDdEZ e e_ dFdGZ!dHdIZ"dJdKZ#dLdMZ$dbdNdOdPdZ%GdQdRdRej&Z'dcdNdOdSdZ(dTdZ)dddUd Z*dedVdZ+GdWddZ,dfdXdZ-dgdYdZ.e-Z/dhdZdZ0Gd[ddZ1Gd\ddZ2yeZ3dd]l4TWne5k rBYnXdS)iaLightweight XML support for Python. XML is an inherently hierarchical data format, and the most natural way to represent it is with a tree. This module has two classes for this purpose: 1. ElementTree represents the whole XML document as a tree and 2. Element represents a single node in this tree. Interactions with the whole document (reading and writing to/from files) are usually done on the ElementTree level. Interactions with a single XML element and its sub-elements are done on the Element level. Element is a flexible container object designed to store hierarchical data structures in memory. It can be described as a cross between a list and a dictionary. Each Element has a number of properties associated with it: 'tag' - a string containing the element's name. 'attributes' - a Python dictionary storing the element's attributes. 'text' - a string containing the element's text content. 'tail' - an optional string containing text after the element's end tag. And a number of child elements stored in a Python sequence. To create an element instance, use the Element constructor, or the SubElement factory function. You can also use the ElementTree class to wrap an element structure and convert it to and from XML. CommentdumpElement ElementTree fromstringfromstringlist iselement iterparseparse ParseErrorPIProcessingInstructionQName SubElementtostring tostringlist TreeBuilderVERSIONXMLXMLID XMLParser XMLPullParserregister_namespacez1.3.0N) ElementPathc@seZdZdZdS)r zAn error when parsing an XML document. In addition to its exception value, a ParseError contains two extra attributes: 'code' - the specific exception code 'position' - the line and column of the error N)__name__ __module__ __qualname____doc__rr-/usr/lib64/python3.6/xml/etree/ElementTree.pyr hscCs t|dS)z2Return True if *element* appears to be an Element.tag)hasattr)elementrrr rvsc@s eZdZdZdZdZdZdZifddZddZ ddZ d d Z d d Z d dZ ddZddZddZddZddZddZddZddZdd Zd9d!d"Zd:d#d$Zd;d%d&Zdd3d4Z d?d5d6Z!d7d8Z"dS)@rahAn XML element. This class is the reference implementation of the Element interface. An element's length is its number of subelements. That means if you want to check if an element is truly empty, you should check BOTH its length AND its text attribute. The element tag, attribute names, and attribute values can be either bytes or strings. *tag* is the element name. *attrib* is an optional dictionary containing element attributes. *extra* are additional element attributes given as keyword arguments. Example form: text...tail NcKsDt|tstd|jjf|j}|j|||_||_g|_ dS)Nzattrib must be dict, not %s) isinstancedict TypeError __class__rcopyupdater!attrib _children)selfr!r*extrarrr __init__s  zElement.__init__cCsd|jj|jt|fS)Nz<%s %r at %#x>)r'rr!id)r,rrr __repr__szElement.__repr__cCs |j||S)zCreate a new element with the same type. *tag* is a string containing the element name. *attrib* is a dictionary containing the element attributes. Do not call this method, use the SubElement factory function instead. )r')r,r!r*rrr makeelements zElement.makeelementcCs0|j|j|j}|j|_|j|_||dd<|S)zReturn copy of current element. This creates a shallow copy. Subelements will be shared with the original tree. N)r1r!r*texttail)r,elemrrr r(s  z Element.copycCs t|jS)N)lenr+)r,rrr __len__szElement.__len__cCstjdtddt|jdkS)NzyThe behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.) stacklevelr)warningswarn FutureWarningr5r+)r,rrr __bool__s zElement.__bool__cCs |j|S)N)r+)r,indexrrr __getitem__szElement.__getitem__cCs||j|<dS)N)r+)r,r=r#rrr __setitem__szElement.__setitem__cCs |j|=dS)N)r+)r,r=rrr __delitem__szElement.__delitem__cCs|j||jj|dS)aAdd *subelement* to the end of this element. The new element will appear in document order after the last existing subelement (or directly after the text, if it's the first subelement), but before the end tag for this element. N)_assert_is_elementr+append)r, subelementrrr rBs zElement.appendcCs(x|D]}|j|qW|jj|dS)zkAppend subelements from a sequence. *elements* is a sequence with zero or more elements. N)rAr+extend)r,elementsr#rrr rDs zElement.extendcCs|j||jj||dS)z(Insert *subelement* at position *index*.N)rAr+insert)r,r=rCrrr rFs zElement.insertcCs t|tstdt|jdS)Nzexpected an Element, not %s)r$ _Element_Pyr&typer)r,errr rAs zElement._assert_is_elementcCs|jj|dS)aRemove matching subelement. Unlike the find methods, this method compares elements based on identity, NOT ON tag value or contents. To remove subelements by other means, the easiest way is to use a list comprehension to select what elements to keep, and then use slice assignment to update the parent element. ValueError is raised if a matching element could not be found. N)r+remove)r,rCrrr rJs zElement.removecCstjdtdd|jS)z`(Deprecated) Return all subelements. Elements are returned in document order. zaThis method will be removed in future versions. Use 'list(elem)' or iteration over elem instead.r7)r8)r9r:DeprecationWarningr+)r,rrr getchildrens zElement.getchildrencCstj|||S)aFind first matching element by tag name or path. *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found. )rfind)r,path namespacesrrr rM!s z Element.findcCstj||||S)aFind text for first matching element by tag name or path. *path* is a string having either an element tag or an XPath, *default* is the value to return if the element was not found, *namespaces* is an optional mapping from namespace prefix to full name. Return text content of first matching element, or default value if none was found. Note that if an element is found having no text content, the empty string is returned. )rfindtext)r,rNdefaultrOrrr rP,s zElement.findtextcCstj|||S)aFind all matching subelements by tag name or path. *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Returns list containing all matching elements in document order. )rfindall)r,rNrOrrr rR:s zElement.findallcCstj|||S)a Find all matching subelements by tag name or path. *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return an iterable yielding all matching elements in document order. )riterfind)r,rNrOrrr rSEs zElement.iterfindcCs |jjg|_d|_|_dS)zReset element. This function removes all subelements, clears all attributes, and sets the text and tail attributes to None. N)r*clearr+r2r3)r,rrr rTPs z Element.clearcCs|jj||S)agGet element attribute. Equivalent to attrib.get, but some implementations may handle this a bit more efficiently. *key* is what attribute to look for, and *default* is what to return if the attribute was not found. Returns a string containing the attribute value, or the default if attribute was not found. )r*get)r,keyrQrrr rU[s z Element.getcCs||j|<dS)zSet element attribute. Equivalent to attrib[key] = value, but some implementations may handle this a bit more efficiently. *key* is what attribute to set, and *value* is the attribute value to set it to. N)r*)r,rVvaluerrr sethsz Element.setcCs |jjS)zGet list of attribute names. Names are returned in an arbitrary order, just like an ordinary Python dict. Equivalent to attrib.keys() )r*keys)r,rrr rYrsz Element.keyscCs |jjS)zGet element attributes as a sequence. The attributes are returned in arbitrary order. Equivalent to attrib.items(). Return a list of (name, value) tuples. )r*items)r,rrr rZ{s z Element.itemsccsH|dkr d}|dks|j|kr$|Vx|jD]}|j|EdHq,WdS)aCreate tree iterator. The iterator loops over the element and all subelements in document order, returning all elements with a matching tag. If the tree structure is modified during iteration, new or removed elements may or may not be included. To get a stable set, use the list() function on the iterator, and loop over the resulting list. *tag* is what tags to look for (default is to return all elements) Return an iterator containing all the matching elements. *N)r!r+iter)r,r!rIrrr r\s  z Element.itercCstjdtddt|j|S)NzbThis method will be removed in future versions. Use 'elem.iter()' or 'list(elem.iter())' instead.r7)r8)r9r:PendingDeprecationWarninglistr\)r,r!rrr getiterators zElement.getiteratorccs^|j}t|t r|dk rdS|j}|r.|Vx*|D]"}|jEdH|j}|r4|Vq4WdS)zCreate text iterator. The iterator loops over the element and all subelements in document order, returning all inner text. N)r!r$strr2itertextr3)r,r!trIrrr ras zElement.itertext)N)NN)N)N)N)N)N)#rrrrr!r*r2r3r.r0r1r(r6r<r>r?r@rBrDrFrArJrLrMrPrRrSrTrUrXrYrZr\r_rarrrr r{s@            cKs,|j}|j||j||}|j||S)aSubelement factory which creates an element instance, and appends it to an existing parent. The element tag, attribute names, and attribute values can be either bytes or Unicode strings. *parent* is the parent element, *tag* is the subelements name, *attrib* is an optional directory containing element attributes, *extra* are additional attributes given as keyword arguments. )r(r)r1rB)parentr!r*r-r#rrr rs    cCstt}||_|S)zComment element factory. This function creates a special element which the standard serializer serializes as an XML comment. *text* is a string containing the comment string. )rrr2)r2r#rrr rs cCs&tt}||_|r"|jd||_|S)a*Processing Instruction element factory. This function creates a special element which the standard serializer serializes as an XML comment. *target* is a string containing the processing instruction, *text* is a string containing the processing instruction contents, if any.  )rr r2)targetr2r#rrr r s c@sZeZdZdZdddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ dS)r aQualified name wrapper. This class can be used to wrap a QName attribute value in order to get proper namespace handing on output. *text_or_uri* is a string containing the QName value either in the form {uri}local, or if the tag argument is given, the URI part of a QName. *tag* is an optional argument which if given, will make the first argument (text_or_uri) be interpreted as a URI, and this argument (tag) be interpreted as a local name. NcCs|rd||f}||_dS)Nz{%s}%s)r2)r,Z text_or_urir!rrr r.s zQName.__init__cCs|jS)N)r2)r,rrr __str__sz QName.__str__cCsd|jj|jfS)Nz<%s %r>)r'rr2)r,rrr r0szQName.__repr__cCs t|jS)N)hashr2)r,rrr __hash__szQName.__hash__cCs t|tr|j|jkS|j|kS)N)r$r r2)r,otherrrr __le__s  z QName.__le__cCs t|tr|j|jkS|j|kS)N)r$r r2)r,rirrr __lt__ s  z QName.__lt__cCs t|tr|j|jkS|j|kS)N)r$r r2)r,rirrr __ge__s  z QName.__ge__cCs t|tr|j|jkS|j|kS)N)r$r r2)r,rirrr __gt__s  z QName.__gt__cCs t|tr|j|jkS|j|kS)N)r$r r2)r,rirrr __eq__s  z QName.__eq__)N) rrrrr.rfr0rhrjrkrlrmrnrrrr r s  c@seZdZdZdddZddZddZdd d Zdd d Zd d dZ d!ddZ d"ddZ d#ddZ d$ddZ d%ddddZddZdS)&ra%An XML element hierarchy. This class also provides support for serialization to and from standard XML. *element* is an optional root element node, *file* is an optional file handle or file name of an XML file whose contents will be used to initialize the tree with. NcCs||_|r|j|dS)N)_rootr )r,r#filerrr r.)szElementTree.__init__cCs|jS)z!Return root element of this tree.)ro)r,rrr getroot/szElementTree.getrootcCs ||_dS)zReplace root element of this tree. This will discard the current contents of the tree and replace it with the given element. Use with care! N)ro)r,r#rrr _setroot3szElementTree._setrootc Csd}t|dst|d}d}zZ|dkrHt}t|drH|j||_|jSx|jd}|sZP|j|qJW|j|_|jS|r|jXdS)a=Load external XML document into element tree. *source* is a file name or file object, *parser* is an optional parser instance that defaults to XMLParser. ParseError is raised if the parser fails to parse the document. Returns the root element of the given source document. FreadrbTN _parse_wholei)r"openrrurorsfeedclose)r,sourceparser close_sourcedatarrr r =s&       zElementTree.parsecCs |jj|S)zCreate and return tree iterator for the root element. The iterator loops over all elements in this tree, in document order. *tag* is a string with the tag name to iterate over (default is to return all elements). )ror\)r,r!rrr r\bs zElementTree.itercCstjdtddt|j|S)NzbThis method will be removed in future versions. Use 'tree.iter()' or 'list(tree.iter())' instead.r7)r8)r9r:r]r^r\)r,r!rrr r_os zElementTree.getiteratorcCs:|dddkr,d|}tjd|tdd|jj||S)a\Find first matching element by tag name or path. Same as getroot().find(path), which is Element.find() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found. Nr/.zThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rr7)r8)r9r:r;rorM)r,rNrOrrr rMxs  zElementTree.findcCs<|dddkr,d|}tjd|tdd|jj|||S)aeFind first matching element by tag name or path. Same as getroot().findtext(path), which is Element.findtext() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found. Nrr}r~zThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rr7)r8)r9r:r;rorP)r,rNrQrOrrr rPs  zElementTree.findtextcCs:|dddkr,d|}tjd|tdd|jj||S)aaFind all matching subelements by tag name or path. Same as getroot().findall(path), which is Element.findall(). *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return list containing all matching elements in document order. Nrr}r~zThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rr7)r8)r9r:r;rorR)r,rNrOrrr rRs  zElementTree.findallcCs:|dddkr,d|}tjd|tdd|jj||S)agFind all matching subelements by tag name or path. Same as getroot().iterfind(path), which is element.iterfind() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return an iterable yielding all matching elements in document order. Nrr}r~zThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rr7)r8)r9r:r;rorS)r,rNrOrrr rSs  zElementTree.iterfindT)short_empty_elementscCs|s d}n|tkrtd||s4|dkr0d}nd}|j}t||}|dkr|sd|dkr|d kr|} |dkrddl} | j} |d | f|d krt||jn,t|j|\} } t|} | ||j| | |d WdQRXdS) aWrite element tree to a file as XML. Arguments: *file_or_filename* -- file name or a file object opened for writing *encoding* -- the output encoding (default: US-ASCII) *xml_declaration* -- bool indicating if an XML declaration should be added to the output. If None, an XML declaration is added if encoding IS NOT either of: US-ASCII, UTF-8, or Unicode *default_namespace* -- sets the default XML namespace (for "xmlns") *method* -- either "xml" (default), "html, "text", or "c14n" *short_empty_elements* -- controls the formatting of elements that contain no content. If True (default) they are emitted as a single self-closed tag, otherwise they are emitted as a pair of start/end tags xmlzunknown method %rc14nutf-8us-asciiNunicoderz$ r2)r)rrr) _serialize ValueErrorlower _get_writerlocalegetpreferredencoding_serialize_textro _namespaces)r,file_or_filenameencodingZxml_declarationdefault_namespacemethodrZ enc_lowerwriteZdeclared_encodingrqnamesrOZ serializerrr rs2     zElementTree.writecCs|j|ddS)Nr)r)r)r,rprrr write_c14n szElementTree.write_c14n)NN)N)N)N)N)NN)N)N)NNNN)rrrrr.rqrrr r\r_rMrPrRrSrrrrrr rs"   %    5ccs"y |j}WnPtk rZ|dkr.t|d}nt|d|dd}||jVWdQRXYnX|dkrl|Vntj}t|tjr|}nft|tjrtj |}|j |j nBtj}dd|_ ||_y|j |_ |j|_Wntk rYnXtj||ddd}|j |j |jVWdQRXdS) Nrwxmlcharrefreplace)rerrorscSsdS)NTrrrrr 3sz_get_writer.. )rrnewline)rAttributeErrorrv contextlib ExitStackr$ioBufferedIOBase RawIOBaseBufferedWritercallbackdetachwritableseekabletell TextIOWrapper)rrrrpstackrrr rs>         rcsddiird<fdd}x|jD]}|j}t|tr\|jkr||jn.add_qname) r\r!r$r r2r`rr rrZ)r4rrr!rVrWr2r)rrOrr rEs4      rc Ks|j}|j}|tkr$|d|n|tkr<|d|nv||}|dkr|r\|t|x|D]}t|||d|dqbWn2|d|t|j} | s|rD|rx@t|jdddD](\} } | rd| } |d | t | fqWxZt| D]N\} } t | t r | j} t | t r$|| j} nt | } |d || | fqW|s\t |s\| r|d |rv|t|x |D]}t|||d|dq|W|d |d n|d |j r|t|j dS)Nz z)r.)rV:z xmlns%s="%s"z %s="%s">z)r!r2rr _escape_cdata_serialize_xmlr^rZsorted_escape_attribr$r r5r3) rr4rrOrkwargsr!r2rIrZvkrrr rsT             rareabasebasefontbrcolframehrimginputisindexlinkmetaparamc Ks|j}|j}|tkr(|dt|n|tkrD|dt|n|||}|dkr|rd|t|x|D]}t|||dqjWn<|d|t|j}|s|rH|rx@t|jdddD](\} } | rd| } |d| t | fqWxZt|D]N\} } t | t r| j} t | t r(|| j} nt | } |d || | fqW|d |j } |r| d ksr| d kr|||n |t|x|D]}t|||dqW| tkr|d |d |jr|t|jdS)Nz zrcSs|dS)Nrr)rrrr rsz!_serialize_html..)rVrz xmlns%s="%s"z %s="%s"rZscriptZstylez|jdd}|Sttfk r`t|YnXdS)N&z&rz<rz>)replacer&rr)r2rrr r$s   rc Csyd|kr|jdd}d|kr*|jdd}d|kr>|jdd}d|krR|jdd}d |krf|jd d }d |krz|jd d }d |kr|jd d }d |kr|jd d}|Sttfk rt|YnXdS)Nrz&rz<rz>"z"z r z  z )rr&rr)r2rrr r4s(        rc Csfy@d|kr|jdd}d|kr*|jdd}d|kr>|jdd}|Sttfk r`t|YnXdS)Nrz&rz>rz")rr&rr)r2rrr rPs   rT)rcCs6|dkrtjntj}t|j||||d|jS)aGenerate string representation of XML element. All subelements are included. If encoding is "unicode", a string is returned. Otherwise a bytestring is returned. *element* is an Element instance, *encoding* is an optional output encoding defaulting to US-ASCII, *method* is an optional output which can be one of "xml" (default), "html", "text" or "c14n". Returns an (optionally) encoded string containing the XML data. r)rr)rStringIOBytesIOrrgetvalue)r#rrrstreamrrr r_sc@s8eZdZdZddZddZddZdd Zd d Zd S) _ListDataStreamz7An auxiliary stream accumulating into a list reference.cCs ||_dS)N)lst)r,rrrr r.tsz_ListDataStream.__init__cCsdS)NTr)r,rrr rwsz_ListDataStream.writablecCsdS)NTr)r,rrr rzsz_ListDataStream.seekablecCs|jj|dS)N)rrB)r,brrr r}sz_ListDataStream.writecCs t|jS)N)r5r)r,rrr rsz_ListDataStream.tellN) rrrrr.rrrrrrrr rrs rcCs&g}t|}t|j||||d|S)N)rr)rrr)r#rrrrrrrr rs cCsNt|tst|}|jtjdd|jj}| s>|ddkrJtjjddS)a#Write element tree or element structure to sys.stdout. This function should be used for debugging only. *elem* is either an ElementTree, or a single Element. The exact output format is implementation dependent. In this version, it's written as an ordinary XML file. r)rrrN)r$rrsysstdoutrqr3)r4r3rrr rs  cCst}|j|||S)zParse XML document into element tree. *source* is a filename or file object containing XML data, *parser* is an optional parser instance defaulting to XMLParser. Return an ElementTree instance. )rr )ryrztreerrr r s  csdt||dfddGfdddtj}|d_~dtds`td d S) aJIncrementally parse XML document into ElementTree. This class also reports what's going on to the user based on the *events* it is initialized with. The supported events are the strings "start", "end", "start-ns" and "end-ns" (the "ns" events are used to get detailed namespace information). If *events* is omitted, only "end" events are reported. *source* is a filename or file object containing XML data, *events* is a list of events to report back, *parser* is an optional parser instance. Returns an iterator providing (event, elem) pairs. )events_parserc 3sbzNx,jEdHjd}|s"Pj|qWj}jEdH|_Wdr\jXdS)Nii@) read_eventsrsrw_close_and_return_rootrootrx)r|r)r{it pullparserryrr iterators  ziterparse..iteratorcseZdZjZdS)z$iterparse..IterParseIteratorN)rrr__next__r)rrr IterParseIteratorsrNFrsrtT)r collectionsIteratorrr"rv)ryrrzrr)r{rrrryr rs   c@s<eZdZd ddddZddZddZd d Zd d ZdS)rN)rcCs<tj|_|pttd|_|dkr(d}|jj|j|dS)N)reend)r)rdeque _events_queuerrr _setevents)r,rrrrr r.s  zXMLPullParser.__init__cCsZ|jdkrtd|rVy|jj|Wn.tk rT}z|jj|WYdd}~XnXdS)zFeed encoded data to parser.Nz!feed() called after end of stream)rrrw SyntaxErrorrrB)r,r|excrrr rws zXMLPullParser.feedcCs|jj}d|_|S)N)rrx)r,rrrr rs z$XMLPullParser._close_and_return_rootcCs |jdS)zFinish feeding data to parser. Unlike XMLParser, does not return the root element. Use read_events() to consume elements from XMLPullParser. N)r)r,rrr rxszXMLPullParser.closeccs2|j}x&|r,|j}t|tr$|q|VqWdS)zReturn an iterator over currently available (event, elem) pairs. Events are consumed from the internal event queue as they are retrieved from the iterator. N)rpopleftr$ Exception)r,reventrrr rs  zXMLPullParser.read_events)N)rrrr.rwrrxrrrrr rs   cCs"|sttd}|j||jS)aParse XML document from string constant. This function can be used to embed "XML Literals" in Python code. *text* is a string containing XML data, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an Element instance. )re)rrrwrx)r2rzrrr rs   cCsV|sttd}|j||j}i}x&|jD]}|jd}|r0|||<q0W||fS)aParse XML document from string constant for its IDs. *text* is a string containing XML data, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an (Element, dict) tuple, in which the dict maps element id:s to elements. )rer/)rrrwrxr\rU)r2rzrZidsr4r/rrr r&s     cCs0|sttd}x|D]}|j|qW|jS)zParse XML document from sequence of string fragments. *sequence* is a list of other sequence, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an Element instance. )re)rrrwrx)Zsequencerzr2rrr r>s   c@sBeZdZdZdddZddZddZd d Zd d Zd dZ dS)raGeneric element structure builder. This builder converts a sequence of start, data, and end method calls to a well-formed element structure. You can use this class to build an element structure using a custom XML parser, or a parser for some other XML-like format. *element_factory* is an optional element factory which is called to create new Element instances, as necessary. NcCs.g|_g|_d|_d|_|dkr$t}||_dS)N)_data_elem_last_tailr_factory)r,Zelement_factoryrrr r.]szTreeBuilder.__init__cCs.t|jdkstd|jdk s(td|jS)z;Flush builder buffers and return toplevel document Element.rzmissing end tagsNzmissing toplevel element)r5rAssertionErrorr)r,rrr rxfszTreeBuilder.closecCsf|jrb|jdk r\dj|j}|jr@|jjdks6td||j_n|jjdksTtd||j_g|_dS)Nrzinternal error (tail)zinternal error (text))rrjoinrr3rr2)r,r2rrr _flushls   zTreeBuilder._flushcCs|jj|dS)zAdd text to current element.N)rrB)r,r|rrr r|xszTreeBuilder.datacCsF|j|j|||_}|jr0|jdj||jj|d|_|S)zOpen new element and return it. *tag* is the element name, *attrs* is a dict containing element attributes. rrr)rrrrrBr)r,r!Zattrsr4rrr start|s zTreeBuilder.startcCs@|j|jj|_|jj|ks4td|jj|fd|_|jS)zOClose and return current Element. *tag* is the element name. z&end tag mismatch (expected %s, got %s)r)rrpoprr!rr)r,r!rrr rs zTreeBuilder.end)N) rrrrr.rxrr|rrrrrr rPs   c@sfeZdZdZdddZddZdd Zd d Zd d ZddZ ddZ ddZ e Z ddZ ddZdS)raElement structure builder for XML source data based on the expat parser. *html* are predefined HTML entities (deprecated and not supported), *target* is an optional target object which defaults to an instance of the standard TreeBuilder class, *encoding* is an optional encoding string which if given, overrides the encoding specified in the XML file: http://www.iana.org/assignments/character-sets rNcCs<yddlm}Wn>tk rNy ddl}Wntk rHtdYnXYnX|j|d}|dkrjt}||_|_||_|_ |j |_ i|_ |j |_t|dr|j|_t|dr|j|_t|dr|j|_t|dr|j|_t|d r|j|_d |_d |_d |_d|_i|_yd |j|_ Wnt!k r6YnXdS) Nr)expatz7No module named expat; use SimpleXMLTreeBuilder insteadrrrr|commentpirzExpat %d.%d.%d)" xml.parsersr ImportErrorZpyexpatZ ParserCreaterrzrre_targeterror_error_names_defaultZDefaultHandlerExpandr"_startStartElementHandler_endEndElementHandlerr|ZCharacterDataHandlerrZCommentHandlerrZProcessingInstructionHandlerZ buffer_textordered_attributesspecified_attributes_doctypeentity version_infoversionr)r,rrerrrzrrr r.sF         zXMLParser.__init__cCs|j}|j}x|D]}|dkrDd|_d|_|||jfdd}||_q|dkrf|||jfdd}||_q|dkr||fdd}||_q|d kr||fd d}||_ qt d |qWdS) NrrcSs|||||fdS)Nr)r!Z attrib_inrrBrrrr handlersz%XMLParser._setevents..handlerrcSs||||fdS)Nr)r!rrBrrrr rszstart-nscSs|||p d|pdffdS)Nrr)rrrrBrrr rszend-nscSs||dfdS)Nr)rrrBrrr rszunknown event %r) rrBrrr r r r ZStartNamespaceDeclHandlerZEndNamespaceDeclHandlerr)r,Z events_queueZevents_to_reportrzrBZ event_namerrrr rs( zXMLParser._seteventscCs&t|}|j|_|j|jf|_|dS)N)r codelinenooffsetZposition)r,rWerrrrr _raiseerrorszXMLParser._raiseerrorc CsFy|j|}Wn2tk r@|}d|kr2d|}||j|<YnX|S)Nrr)rKeyError)r,rVnamerrr _fixnameszXMLParser._fixnamecCsV|j}||}i}|rHx0tdt|dD]}||d||||<q(W|jj||S)Nrr7r)rranger5rer)r,r!Z attr_listZfixnamer*irrr r szXMLParser._startcCs|jj|j|S)N)rerr)r,r!rrr r szXMLParser._endc Cs|dd}|dkry |jj}Wntk r4dSXy||j|ddWnZtk rddlm}|jd||jj |jj f}d|_ |jj |_ |jj |_ |YnXnD|dkr|ddd krg|_n"|jdk r|d krd|_dS|j}|sdS|jj|t|j}|d kr|jd}|d krb|d krb|j\}}} } | r| dd} n*|dkr|dkr|j\}}} d} ndSt|jdr|jj|| | ddn:|j|jkr|j|| | dd|j|| | ddd|_dS)Nrrr)rz'undefined entity %s: line %d, column %d r z "s) A   0t4 =2 2  05   KU PK!Ib},__pycache__/ElementPath.cpython-36.opt-2.pycnu[3 \&@sddlZejdZdddZddZddZd d Zd d Zd dZddZ ddZ eeee ee dZ iZ GdddZ dddZd ddZd!ddZd"ddZdS)#Nz\('[^']*'|\"[^\"]*\"|::|//?|\.\.|\(\)|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@=\s]+)|\s+c csxtj|D]}|d}|r|ddkrd|kry6|jdd\}}|sJt|dd|||ffVWqtk rtd|YqXq |Vq WdS)Nr{:z{%s}%sz!prefix %r not found in prefix map)xpath_tokenizer_refindallsplitKeyError SyntaxError)pattern namespacestokentagprefixZurir-/usr/lib64/python3.6/xml/etree/ElementPath.pyxpath_tokenizerIsrcCsF|j}|dkrBi|_}x(|jjD]}x|D] }|||<q.Wq$W|S)N) parent_maprootiter)contextrperrrget_parent_mapWs  rcs|dfdd}|S)Nrc3s0x*|D]"}x|D]}|jkr|VqWqWdS)N)r )rresultelemr)r rrselectbs   zprepare_child..selectr)nextr rr)r r prepare_child`s rcCs dd}|S)Ncssx|D]}|EdHqWdS)Nr)rrrrrrrjs zprepare_star..selectr)rr rrrr prepare_starisrcCs dd}|S)Ncss|EdHdS)Nr)rrrrrrpszprepare_self..selectr)rr rrrr prepare_selfosrc s\y |}Wntk rdSX|ddkr2dn|dsD|dntdfdd}|S)Nr*rzinvalid descendantc3s4x.|D]&}x |jD]}||k r|VqWqWdS)N)r)rrrr)r rrrs z"prepare_descendant..select) StopIterationr )rr rr)r rprepare_descendantts    r"cCs dd}|S)NcssDt|}i}x2|D]*}||kr||}||krd||<|VqWdS)N)r)rrrZ result_maprparentrrrrs zprepare_parent..selectr)rr rrrrprepare_parents r$c s*g}g}xy |}Wntk r(dSX|ddkr8P|drh|ddddkrhd|dddf}|j|dpvd|j|dq Wdj|}|dkr|dfd d }|S|d kr|d|dfd d }|S|dkrtjd |d r|dfdd }|S|dkrVtjd |d rV|d|dfdd }|S|dkst|dkst|dkr|dkrt|dddkrtdnl|ddkrtd|dkr yt|ddWntk rtdYnXdkrtdndfdd }|StddS) Nr]rz'"'-z@-c3s&x |D]}|jdk r|VqWdS)N)get)rrr)keyrrrs z!prepare_predicate..selectz@-='c3s&x |D]}|jkr|VqWdS)N)r))rrr)r*valuerrrs z\-?\d+$c3s&x |D]}|jdk r|VqWdS)N)find)rrr)r rrrs z-='c3s@x:|D]2}x,|jD]}dj|jkr|VPqWqWdS)Nr()rjoinZitertext)rrrr)r r+rrrs  z-()z-()-zXPath position >= 1 expectedZlastzunsupported functionzunsupported expressionz)XPath offset from last() must be negativec 3sbt|}xT|D]L}y.||}t|j|j}||kr>|VWqttfk rXYqXqWdS)N)rlistrr IndexErrorr)rrrrr#Zelems)indexrrrs   zinvalid predicater2r2r2)r!appendr-rematchintr ValueError)rr Z signatureZ predicaterr)r1r*r r+rprepare_predicatesd            r9)r(r .z..z//[c@seZdZdZddZdS)_SelectorContextNcCs ||_dS)N)r)selfrrrr__init__sz_SelectorContext.__init__)__name__ __module__ __qualname__rr>rrrrr<sr<c !Csh||dkrdntt|jf}|dddkr8|d}y t|}Wntk r:ttdkrjtj|dddkrtdtt ||j }y |}Wnt k rdSXg}xvy|j t |d||Wnt k rtdYnXy|}|ddkr|}Wqt k r(PYqXqW|t|<YnX|g}t|}x|D]} | ||}qPW|S) Nr/r dz#cannot use absolute path on elementrz invalid pathr2)tuplesorteditems_cacherlenclearr rr__next__r!r4opsr<) rpathr Z cache_keyZselectorrr rrrrrriterfindsD      rMcCstt|||dS)N)rrM)rrLr rrrr,)sr,cCstt|||S)N)r/rM)rrLr rrrr/src Cs4ytt|||}|jpdStk r.|SXdS)Nr()rrMtextr!)rrLdefaultr rrrfindtext5s  rP)N)N)N)N)NN)r5compilerrrrrrr"r$r9rKrGr<rMr,rrPrrrr;s,    Y )  PK!A3}}#__pycache__/__init__.cpython-36.pycnu[3 \D@sdS)Nrrr*/usr/lib64/python3.6/xml/etree/__init__.pysPK!A3}})__pycache__/__init__.cpython-36.opt-1.pycnu[3 \D@sdS)Nrrr*/usr/lib64/python3.6/xml/etree/__init__.pysPK!>)>>cElementTree.pynu[# Wrapper module for _elementtree from _elementtree import * PK!Eg%%ElementPath.pynu[# # ElementTree # $Id: ElementPath.py 3375 2008-02-13 08:05:08Z fredrik $ # # limited xpath support for element trees # # history: # 2003-05-23 fl created # 2003-05-28 fl added support for // etc # 2003-08-27 fl fixed parsing of periods in element names # 2007-09-10 fl new selection engine # 2007-09-12 fl fixed parent selector # 2007-09-13 fl added iterfind; changed findall to return a list # 2007-11-30 fl added namespaces support # 2009-10-30 fl added child element value filter # # Copyright (c) 2003-2009 by Fredrik Lundh. All rights reserved. # # fredrik@pythonware.com # http://www.pythonware.com # # -------------------------------------------------------------------- # The ElementTree toolkit is # # Copyright (c) 1999-2009 by Fredrik Lundh # # By obtaining, using, and/or copying this software and/or its # associated documentation, you agree that you have read, understood, # and will comply with the following terms and conditions: # # Permission to use, copy, modify, and distribute this software and # its associated documentation for any purpose and without fee is # hereby granted, provided that the above copyright notice appears in # all copies, and that both that copyright notice and this permission # notice appear in supporting documentation, and that the name of # Secret Labs AB or the author not be used in advertising or publicity # pertaining to distribution of the software without specific, written # prior permission. # # SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD # TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- # ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR # BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE. # -------------------------------------------------------------------- # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/psf/license for licensing details. ## # Implementation module for XPath support. There's usually no reason # to import this module directly; the ElementTree does this for # you, if needed. ## import re xpath_tokenizer_re = re.compile( "(" "'[^']*'|\"[^\"]*\"|" "::|" "//?|" "\.\.|" "\(\)|" "[/.*:\[\]\(\)@=])|" "((?:\{[^}]+\})?[^/\[\]\(\)@=\s]+)|" "\s+" ) def xpath_tokenizer(pattern, namespaces=None): for token in xpath_tokenizer_re.findall(pattern): tag = token[1] if tag and tag[0] != "{" and ":" in tag: try: prefix, uri = tag.split(":", 1) if not namespaces: raise KeyError yield token[0], "{%s}%s" % (namespaces[prefix], uri) except KeyError: raise SyntaxError("prefix %r not found in prefix map" % prefix) else: yield token def get_parent_map(context): parent_map = context.parent_map if parent_map is None: context.parent_map = parent_map = {} for p in context.root.iter(): for e in p: parent_map[e] = p return parent_map def prepare_child(next, token): tag = token[1] def select(context, result): for elem in result: for e in elem: if e.tag == tag: yield e return select def prepare_star(next, token): def select(context, result): for elem in result: for e in elem: yield e return select def prepare_self(next, token): def select(context, result): for elem in result: yield elem return select def prepare_descendant(next, token): token = next() if token[0] == "*": tag = "*" elif not token[0]: tag = token[1] else: raise SyntaxError("invalid descendant") def select(context, result): for elem in result: for e in elem.iter(tag): if e is not elem: yield e return select def prepare_parent(next, token): def select(context, result): # FIXME: raise error if .. is applied at toplevel? parent_map = get_parent_map(context) result_map = {} for elem in result: if elem in parent_map: parent = parent_map[elem] if parent not in result_map: result_map[parent] = None yield parent return select def prepare_predicate(next, token): # FIXME: replace with real parser!!! refs: # http://effbot.org/zone/simple-iterator-parser.htm # http://javascript.crockford.com/tdop/tdop.html signature = [] predicate = [] while 1: token = next() if token[0] == "]": break if token[0] and token[0][:1] in "'\"": token = "'", token[0][1:-1] signature.append(token[0] or "-") predicate.append(token[1]) signature = "".join(signature) # use signature to determine predicate type if signature == "@-": # [@attribute] predicate key = predicate[1] def select(context, result): for elem in result: if elem.get(key) is not None: yield elem return select if signature == "@-='": # [@attribute='value'] key = predicate[1] value = predicate[-1] def select(context, result): for elem in result: if elem.get(key) == value: yield elem return select if signature == "-" and not re.match("\d+$", predicate[0]): # [tag] tag = predicate[0] def select(context, result): for elem in result: if elem.find(tag) is not None: yield elem return select if signature == "-='" and not re.match("\d+$", predicate[0]): # [tag='value'] tag = predicate[0] value = predicate[-1] def select(context, result): for elem in result: for e in elem.findall(tag): if "".join(e.itertext()) == value: yield elem break return select if signature == "-" or signature == "-()" or signature == "-()-": # [index] or [last()] or [last()-index] if signature == "-": index = int(predicate[0]) - 1 else: if predicate[0] != "last": raise SyntaxError("unsupported function") if signature == "-()-": try: index = int(predicate[2]) - 1 except ValueError: raise SyntaxError("unsupported expression") else: index = -1 def select(context, result): parent_map = get_parent_map(context) for elem in result: try: parent = parent_map[elem] # FIXME: what if the selector is "*" ? elems = list(parent.findall(elem.tag)) if elems[index] is elem: yield elem except (IndexError, KeyError): pass return select raise SyntaxError("invalid predicate") ops = { "": prepare_child, "*": prepare_star, ".": prepare_self, "..": prepare_parent, "//": prepare_descendant, "[": prepare_predicate, } _cache = {} class _SelectorContext: parent_map = None def __init__(self, root): self.root = root # -------------------------------------------------------------------- ## # Generate all matching objects. def iterfind(elem, path, namespaces=None): # compile selector pattern if path[-1:] == "/": path = path + "*" # implicit all (FIXME: keep this?) try: selector = _cache[path] except KeyError: if len(_cache) > 100: _cache.clear() if path[:1] == "/": raise SyntaxError("cannot use absolute path on element") next = iter(xpath_tokenizer(path, namespaces)).next token = next() selector = [] while 1: try: selector.append(ops[token[0]](next, token)) except StopIteration: raise SyntaxError("invalid path") try: token = next() if token[0] == "/": token = next() except StopIteration: break _cache[path] = selector # execute selector pattern result = [elem] context = _SelectorContext(elem) for select in selector: result = select(context, result) return result ## # Find first matching object. def find(elem, path, namespaces=None): try: return iterfind(elem, path, namespaces).next() except StopIteration: return None ## # Find all matching objects. def findall(elem, path, namespaces=None): return list(iterfind(elem, path, namespaces)) ## # Find text for first matching object. def findtext(elem, path, default=None, namespaces=None): try: elem = iterfind(elem, path, namespaces).next() return elem.text or "" except StopIteration: return default PK!ElementInclude.pynu[# # ElementTree # $Id: ElementInclude.py 3375 2008-02-13 08:05:08Z fredrik $ # # limited xinclude support for element trees # # history: # 2003-08-15 fl created # 2003-11-14 fl fixed default loader # # Copyright (c) 2003-2004 by Fredrik Lundh. All rights reserved. # # fredrik@pythonware.com # http://www.pythonware.com # # -------------------------------------------------------------------- # The ElementTree toolkit is # # Copyright (c) 1999-2008 by Fredrik Lundh # # By obtaining, using, and/or copying this software and/or its # associated documentation, you agree that you have read, understood, # and will comply with the following terms and conditions: # # Permission to use, copy, modify, and distribute this software and # its associated documentation for any purpose and without fee is # hereby granted, provided that the above copyright notice appears in # all copies, and that both that copyright notice and this permission # notice appear in supporting documentation, and that the name of # Secret Labs AB or the author not be used in advertising or publicity # pertaining to distribution of the software without specific, written # prior permission. # # SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD # TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- # ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR # BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE. # -------------------------------------------------------------------- # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/psf/license for licensing details. ## # Limited XInclude support for the ElementTree package. ## import copy from . import ElementTree XINCLUDE = "{http://www.w3.org/2001/XInclude}" XINCLUDE_INCLUDE = XINCLUDE + "include" XINCLUDE_FALLBACK = XINCLUDE + "fallback" ## # Fatal include error. class FatalIncludeError(SyntaxError): pass ## # Default loader. This loader reads an included resource from disk. # # @param href Resource reference. # @param parse Parse mode. Either "xml" or "text". # @param encoding Optional text encoding. # @return The expanded resource. If the parse mode is "xml", this # is an ElementTree instance. If the parse mode is "text", this # is a Unicode string. If the loader fails, it can return None # or raise an IOError exception. # @throws IOError If the loader fails to load the resource. def default_loader(href, parse, encoding=None): with open(href) as file: if parse == "xml": data = ElementTree.parse(file).getroot() else: data = file.read() if encoding: data = data.decode(encoding) return data ## # Expand XInclude directives. # # @param elem Root element. # @param loader Optional resource loader. If omitted, it defaults # to {@link default_loader}. If given, it should be a callable # that implements the same interface as default_loader. # @throws FatalIncludeError If the function fails to include a given # resource, or if the tree contains malformed XInclude elements. # @throws IOError If the function fails to load a given resource. def include(elem, loader=None): if loader is None: loader = default_loader # look for xinclude elements i = 0 while i < len(elem): e = elem[i] if e.tag == XINCLUDE_INCLUDE: # process xinclude directive href = e.get("href") parse = e.get("parse", "xml") if parse == "xml": node = loader(href, parse) if node is None: raise FatalIncludeError( "cannot load %r as %r" % (href, parse) ) node = copy.copy(node) if e.tail: node.tail = (node.tail or "") + e.tail elem[i] = node elif parse == "text": text = loader(href, parse, e.get("encoding")) if text is None: raise FatalIncludeError( "cannot load %r as %r" % (href, parse) ) if i: node = elem[i-1] node.tail = (node.tail or "") + text + (e.tail or "") else: elem.text = (elem.text or "") + text + (e.tail or "") del elem[i] continue else: raise FatalIncludeError( "unknown parse type in xi:include tag (%r)" % parse ) elif e.tag == XINCLUDE_FALLBACK: raise FatalIncludeError( "xi:fallback tag must be child of xi:include (%r)" % e.tag ) else: include(e, loader) i = i + 1 PK![0__pycache__/ElementInclude.cpython-312.opt-2.pycnu[ ֦i(ddlZddlmZddlmZdZedzZedzZdZGd d e Z Gd d e Z dd Z ddefdZ dZy)N) ElementTree)urljoinz!{http://www.w3.org/2001/XInclude}includefallbackc eZdZy)FatalIncludeErrorN__name__ __module__ __qualname__1/usr/lib64/python3.12/xml/etree/ElementInclude.pyr r Crr c eZdZy)LimitedRecursiveIncludeErrorNr rrrrrGrrrc|dk(r:t|d5}tj|j}ddd|S|sd}t|d|5}|j }ddd|S#1swYSxYw#1swYSxYw)NxmlrbzUTF-8r)encoding)openrparsegetrootread)hrefrrfiledatas rdefault_loaderr!Ws ~ $ $$T*224D K H $h /499;D0 K K0 Ks$A-A:-A7:Bc|d}n|dkrtd|zt|dr|j}|t}t ||||t y)Nrz;expected non-negative depth or None for 'max_depth', got %rr) ValueErrorhasattrrr!_includeset)elemloaderbase_url max_depths rrrusW QVYbbcctY||~ ~ T68Y6rcd}|t|kr||}|jtk(r|jd}|r t ||}|jdd}|dk(r||vrt d|z|dk(rt d|z|j||||} | t d|d|tj| } t| |||d z ||j||jr"| jxsd |jz| _ | ||<n|d k(r||||jd } | t d|d||jr| |jz } |r!||d z } | jxsd | z| _ n|jxsd | z|_ ||=t d |z|jtk(rt d|jzt||||||d z }|t|kryy)Nrrrrzrecursive include of %sz5maximum xinclude depth reached when including file %sz cannot load z as rtextrz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r))lentagXINCLUDE_INCLUDEgetrr raddcopyr&removetailr.XINCLUDE_FALLBACK) r(r)r*r+ _parent_hrefsierrnoder.s rr&r&s A c$i- G 55$ $55=Dx.EE'5)E~=(+,E,LMM>6ORVVXX!!$'dE*<+26>yyvtY]MJ$$T*66!%bAFF :DIQ&dE155+<=<+26>66AFFND!9D!%bD 8DI!%bD 8DIG'?%GUU' '#BQUUJ  Q)] C Qg c$i-r)N)r4r-r urllib.parserXINCLUDEr1r7DEFAULT_MAX_INCLUSION_DEPTH SyntaxErrorr rr!rr&rrrr@sff  .i'z)     #4 <1 76rPK!99-__pycache__/ElementPath.cpython-312.opt-2.pycnu[ ֦i6ddlZejdZddZdZdZdZdZdZd Z d Z d Z d Z eee e e e d Z iZGddZddZddZddZddZy)Nz`('[^']*'|\"[^\"]*\"|::|//?|\.\.|\(\)|!=|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@!=\s]+)|\s+c#jK|r|jdnd}d}tj|D]d}|\}}|rR|ddk7rJd|vr.|jdd\}} |st|d||d|fn|r|s |d|d|fn|d}\||d k(}fy#t$rt d|zdwxYww) NFr{:}z!prefix %r not found in prefix map@)getxpath_tokenizer_refindallsplitKeyError SyntaxError) pattern namespacesdefault_namespaceparsing_attributetokenttypetagprefixuris ./usr/lib64/python3.12/xml/etree/ElementPath.pyxpath_tokenizerrJs.8 r*d#++G4 s 3q6S=cz!iiQ/ ^%&Z-?!EEE#+<):C@@@ % K % %5 ^%&IF&RSY]]^sAB3B2%B3B00B3c|j}|4ix|_}|jjD]}|D]}|||< |SN) parent_maprootiter)contextrpes rget_parent_mapr#bsR##J*,,Z""$A ! 1 % c&|dddk(xs|dddk(S)N{*}}*rs r_is_wildcard_tagr,ls# r7e  /s23x4//r$c8ttcdk(rfd}|Sdk(rfd}|Sdddk(r+ddtt dddfd}|Sd dd k(r$dd tdtfd }|St d )Nz{*}*c3LK|D]}|js|ywrr+)r resultelem _isinstance_strs rselectz_prepare_tag..selectvs$txx.Js$$z{}*c3bK|D]%}|j}|s|ddk7s"|'yw)Nrrr+)r r/r0el_tagr1r2s rr3z_prepare_tag..select|s4vt,c1AJ ///r&r'c3lK|D]*}|j}|k(s|s|k(s'|,ywrr+) r r/r0r5r1r2no_nssuffixrs rr3z_prepare_tag..selects;S=K$=&-SYBYJs 444r(r)c3bK|D]%}|j}|s|k(s"|'ywrr+)r r/r0r5r1r2nsns_onlys rr3z_prepare_tag..selects4vt,B1FJr6zinternal parser error, got ) isinstancestrslicelen RuntimeError)rr3r1r2r9r=r>r:s` @@@@@@r _prepare_tagrDps"CK f} @ M9  4 M+ RaE QRs6{lD)!"g   M RST  "Xc"g&  M8>??r$cr|dtrtfd}|Sdddk(rddfd}|S)Nrc(d}|||S)Nc32K|D] }|Ed{y7wrr*)r/r0s r select_childz3prepare_child..select..select_childs"D#OO## r*r r/rH select_tags rr3zprepare_child..selects $g|F';< .selects+Auu|s' ')r,rDnextrr3rKrs @@r prepare_childrQsP (C!#&  = M r7d?ab'C Mr$c d}|S)Nc32K|D] }|Ed{y7wrr*)r r/r0s rr3zprepare_star..selectsDOO rIr*rPrr3s r prepare_starrUs Mr$c d}|S)Nc3$K|Ed{y7wrr*)r r/s rr3zprepare_self..selectss r*rTs r prepare_selfrXs  Mr$c |}|ddk(rdn|ds|dn tdtrtfd}|Sdddk(rddfd}|S#t$rYywxYw) Nr*rzinvalid descendantc(d}|||S)Nc3VK|D] }|jD] }||us| "ywrr)r/r0r"s rrHz8prepare_descendant..select..select_childs,"D!YY[D="#G)#s) )r*rJs rr3z"prepare_descendant..selects $ g|F';< .selects/3A}(s+ +) StopIterationrr,rDrOs @@rprepare_descendantr`s Qx3 1XAh.//!#&  = M r7d?ab'C M5 sA A)(A)c d}|S)Nc3dKt|}i}|D]}||vs||}||vsd||<|ywr)r#)r r/r result_mapr0parents rr3zprepare_parent..selectsH#G,  Dz!#D)+)-Jv& L s 0 0 0r*rTs rprepare_parentres ! Mr$c g}g} |}|ddk(rnL|dk(r|dr|ddddvr d|dddf}|j|dxsd|j|d]d j|}|d k(r |dfd }|S|d k(s|d k(r|d|d  fd} fd}d|vr|S|S|dk(r%tjd|ds |dfd}|S|dk(s(|dk(s#|dk(s|dk(rDtjd|ds+|d|d r  fd} fd}n fd} fd}d|vr|S|S|dk(s |dk(s|dk(ri|dk(r!t |ddz dkrGt d|ddk7r t d|dk(r" t |d dz d"kDr t d#dfd$}|St d%#t$rYywxYw#t$r t d!wxYw)&Nrr])rrz'"'r;-rz@-c3HK|D]}|j|ywrr )r r/r0keys rr3z!prepare_predicate..selects$88C=,J""z@-='z@-!='c3NK|D]}|jk(s|ywrrk)r r/r0rlvalues rr3z!prepare_predicate..selects&88C=E)Js%%c3XK|D] }|jx}|k7s|"ywrrk)r r/r0 attr_valuerlros rselect_negatedz)prepare_predicate..select_negateds0"&((3-/J<uATJs ***z!=z\-?\d+$c3HK|D]}|j|ywr)find)r r/r0rs rr3z!prepare_predicate..selects$99S>-Jrmz.='z.!='z-='z-!='c3K|D]@}|jD]*}dj|jk(s&|@BywNr)r joinitertextr r/r0r"rros rr3z!prepare_predicate..selectsC"D!\\#.771::<0E9"&J!/# .select_negated"sC"D!]]3/771::<0E9"&J!0#rzc3jK|D])}dj|jk(s&|+ywrvrwrxr r/r0ros rr3z!prepare_predicate..select)-"Dwwt}}/58" #(33c3jK|D])}dj|jk7s&|+ywrvr~rs rrrz)prepare_predicate..select_negated-rrz-()z-()-zXPath position >= 1 expectedlastzunsupported functionr7zunsupported expressionr(z)XPath offset from last() must be negativec3Kt|}|D]7} ||}t|j|j}||ur|9y#tt f$rYLwxYwwr)r#listr r IndexErrorr)r r/rr0rdelemsindexs rr3z!prepare_predicate..selectEsk'0J'-F !9:EU|t+" #H-s(A!4A  A! AA!AA!zinvalid predicate)r_appendrwrematchintr ValueError) rPr signature predicater3rrrrlrros @@@@rprepare_predicaters|II  FE 8s?  H   8a! -q!B'EqS)q"  "IDl  Fi72l"   "&!2~>>CYq\ Bl  EY&0 % 9#6HHZ16l"   "  " # #"&!2~>>C9-f1D   ! %)Eqy!"@AA|v%!"899F"@ ! -1E2:%&QRR  ) **M   h"@%&>??@sF6G6 GGG)rrZ.z..z//[ceZdZdZdZy)_SelectorContextNc||_yr)r)selfrs r__init__z_SelectorContext.__init__`s  r$)__name__ __module__ __qualname__rrr*r$rrr^s Jr$rc|dddk(r|dz}|f}|r%|tt|jz } t|}|g}t|}|D] } | ||} |S#t$rt tdkDrtj |dddk(r tdtt||j} |}n#t$rYYywxYwg} |jt|d||n#t$r tddwxYw |}|ddk(r|}n#t$rYnwxYwd|t|<Y wxYw) Nr;/rZdrz#cannot use absolute path on elementrz invalid path)tuplesorteditems_cacherrBclearrrr__next__r_ropsr) r0pathr cache_keyselectorrPrr/r r3s rr|r|hsv BCyCczIU6*"2"2"4566 %)$2VFt$G( M9 % v;  LLN 8s?CD DOD*56?? FE    <E!H dE :;  <!.1t; < 8s? FE   %y-%sr A""A!EC  E CECE !DEDED32E3 D?<E>D?? EEc0tt|||dSr)rPr|r0rrs rrtrts tZ0$ 77r$c.tt|||Sr)rr|rs rr r s tZ0 11r$c tt|||}|jy|jS#t$r|cYSwxYwrv)rPr|textr_)r0rdefaultrs rfindtextrsEHT445 99 yy s"1 1 ??r)NN)rcompiler rr#r,rDrQrUrXr`rerrrrr|rtr rr*r$rrsv RZZ   -00&R&  > n+b        'X8 2 r$PK!z-__pycache__/ElementTree.cpython-312.opt-2.pycnu[ ֦i!! gdZdZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z Gdde Z dZGd d Zifd ZdBd ZdBd ZeZGddZGddZej,dZdBdZdZhdZdZdZeeedZdZddddddd d!Zee_d"Z d#Z!d$Z"d%Z#dCddd&d'd(Z$Gd)d*ejJZ&dCddd&d'd+Z'd,Z(dDd-Z)dBd.Z*dCd/Z+Gd0d1Z,dBd2Z-dBd3Z.e-Z/dBd4Z0Gd5d6Z1Gd7d8Z2dBddd9d:Z3ejhd;ejjjlZ7Gd<d=Z8d>Z9d?Z: eZ;dd@l<ddAl$rYywxYw)E)CommentdumpElement ElementTree fromstringfromstringlistindent iselement iterparseparse ParseErrorPIProcessingInstructionQName SubElementtostring tostringlist TreeBuilderVERSIONXMLXMLID XMLParser XMLPullParserregister_namespace canonicalizeC14NWriterTargetz1.3.0N) ElementPathceZdZ y)r N)__name__ __module__ __qualname__./usr/lib64/python3.12/xml/etree/ElementTree.pyr r ks  r$r c t|dS)Ntag)hasattr)elements r%r r ys< 7E ""r$ceZdZ dZ dZ dZ dZ ifdZdZdZ dZ dZ dZ dZ d Zd Zd Zd Zd ZdZdZddZddZddZddZdZddZdZdZdZddZdZy)rNc t|ts"td|jj||_i|||_g|_y)Nzattrib must be dict, not ) isinstancedict TypeError __class__r r'attrib _children)selfr'r0extras r%__init__zElement.__init__sL&$'  )),- -))5) r$c`d|jj|jt|fzS)Nz<%s %r at %#x>)r/r r'idr2s r%__repr__zElement.__repr__s&4>>#:#:DHHbh"OOOr$c( |j||SN)r/)r2r'r0s r% makeelementzElement.makeelements ~~c6**r$c|j|j|j}|j|_|j|_||dd|Sr:)r;r'r0texttail)r2elems r%__copy__zElement.__copy__s@$++6II II Q r$c,t|jSr:)lenr1r7s r%__len__zElement.__len__s4>>""r$cjtjdtdt|jdk7S)NzTesting an element's truth value will always return True in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. stacklevelr)warningswarnDeprecationWarningrBr1r7s r%__bool__zElement.__bool__s1  K 1   4>>"a''r$c |j|Sr:r1r2indexs r% __getitem__zElement.__getitem__s~~e$$r$ct|tr|D]}|j|n|j|||j|<yr:)r,slice_assert_is_elementr1)r2rOr)elts r% __setitem__zElement.__setitem__sB eU #'',  # #G , 'ur$c|j|=yr:rMrNs r% __delitem__zElement.__delitem__s NN5 !r$c^ |j||jj|yr:rSr1appendr2 subelements r%rZzElement.appends)   + j)r$cl |D].}|j||jj|0yr:rY)r2elementsr)s r%extendzElement.extends3  G  # #G , NN ! !' * r$c` |j||jj||yr:)rSr1insert)r2rOr\s r%razElement.inserts'6  + eZ0r$cft|ts!tdt|jzy)Nzexpected an Element, not %s)r, _Element_Pyr.typer )r2es r%rSzElement._assert_is_elements.![)9DGr7s r%rvz Element.clear?s.  $$ DIr$c< |jj||Sr:)r0get)r2keyrps r%rxz Element.getJs {{sG,,r$c$ ||j|<yr:)r0)r2ryvalues r%setz Element.setWs ! Cr$c8 |jjSr:)r0keysr7s r%r~z Element.keysas {{!!r$c8 |jjSr:)r0itemsr7s r%rz Element.itemsjs {{  ""r$c#K |dk(rd}||j|k(r||jD]}|j|Ed{y7w)N*)r'r1iter)r2r'res r%rz Element.iterusO  #:C ;$((c/JAvvc{ " " "sAA A A c#K |j}t|ts|y|j}|r||D]-}|j Ed{|j }|s*|/y7wr:)r'r,strr=itertextr>)r2r'tres r%rzElement.itertextse hh#s#  II GAzz| # #A  #sA A* A(A*!A*r:NN) r r!r"r'r0r=r>r4r8r;r@rCrKrPrUrWrZr_rarSrgrirnrrrtrvrxr|r~rrrr#r$r%rr~s( C F1 D D$&P +#(%(" *+1 N * 8 E ; < % -!" ##,r$rc Z i||}|j||}|j||Sr:)r;rZ)parentr'r0r3r)s r%rrs; ! % F  f-G MM' Nr$c4 tt}||_|Sr:)rrr=)r=r)s r%rrsgGGL Nr$cf tt}||_|r|jdz|z|_|S)N )rrr=)targetr=r)s r%rrs8+,GGL ||c)D0 Nr$cFeZdZ d dZdZdZdZdZdZdZ d Z d Z y) rNc&|rd|d|}||_y)N{}r=)r2 text_or_urir's r%r4zQName.__init__s &137K r$c|jSr:rr7s r%__str__z QName.__str__s yyr$cPd|jjd|jdS)N)r/r r=r7s r%r8zQName.__repr__s NN33TYY??r$c,t|jSr:)hashr=r7s r%__hash__zQName.__hash__sDIIr$crt|tr|j|jkS|j|kSr:r,rr=r2others r%__le__z QName.__le__. eU #99 * *yyE!!r$crt|tr|j|jkS|j|kSr:rrs r%__lt__z QName.__lt__. eU #99uzz) )yy5  r$crt|tr|j|jk\S|j|k\Sr:rrs r%__ge__z QName.__ge__rr$crt|tr|j|jkDS|j|kDSr:rrs r%__gt__z QName.__gt__rr$crt|tr|j|jk(S|j|k(Sr:rrs r%__eq__z QName.__eq__rr$r:) r r!r"r4rr8rrrrrrr#r$r%rrs5  @"!"!"r$rcneZdZ ddZdZdZddZddZddZddZ dd Z dd Z dd d d Z dZ y)rNc:||_|r|j|yyr:)_rootr )r2r)files r%r4zElementTree.__init__ s  JJt  r$c |jSr:rr7s r%getrootzElementTree.getroots/zzr$c ||_yr:r)r2r)s r%_setrootzElementTree._setroots  r$c d}t|dst|d}d} |Kt}t|dr5|j||_|j|r|j SS|j dx}r%|j||j dx}r%|j |_|j|r|j SS#|r|j wwxYw)NFreadrbT _parse_wholei)r(openrrrcloserfeed)r2sourceparser close_sourcedatas r%r zElementTree.parse!s  vv&&$'FL ~"6>2 "(!4!4V! r=r) _serialize ValueError _get_writerlower_serialize_textr _namespaces) r2file_or_filenameencodingxml_declarationdefault_namespacemethodrwritedeclared_encodingqnamesrl serializes r%rzElementTree.writes  .F : %069: :"% )8 48R@QO$,^^%2&,,.6KK%()tzz2%0=N%O" &v. %VZ/CE5 4 4s BCCc(|j|dS)Nr)r)r)r2rs r% write_c14nzElementTree.write_c14nszz$vz..r$rr:)NNNN)r r!r"r4rrr rrirnrrrtrrr#r$r%rrsZ   D $1,>,4,5." $ 3E $( 3Ej/r$rc#~K |j}|jdk(r|t|ddxsdfytj5}t |t jr|}nt |t jr1t j|}|j|jnFt j}d|_ ||_ |j|_ |j|_t j ||dd}|j|j|j|fdddy#t$rYXwxYw#1swYyxYw#t$rM|jdk(rd}t#|d|d 5}|j|fdddYy#1swYYyxYwwxYww) NrrrcyNTr#r#r$r%z_get_writer..sDr$xmlcharrefreplace )rerrorsnewlinew)rr)rrgetattr contextlib ExitStackr,ioBufferedIOBase RawIOBaseBufferedWritercallbackdetachwritableseekabletellAttributeError TextIOWrapperr)rrrstackrs r%rrs-+ && >> y (!1:tDOO O%%'5.0A0AB+D 0",,?,,-=>DNN4;;/,,.D$0DM!&DJ)9(A(A $4$9$9 ''19/B046 t{{+jj(**9('&*'(' ' >> y (H "C(,.15**h& &... 'sF= E$=F= B E"E .add_qname s .RayC 9++C3S#,>+//4F~!'#j/!9*0 3/5s$;F5M$'F5M$$3!&u  . &u - .sA.B 2B 8B B"!B") rr'r,rr=rrr rr) r?rrr'ryr{r=rlrs ` @@r%rrs(D\FJ(* $%.8 hh c5 !xxv%#((# S !& # _G!32 &s +**,JC#u%hh& #%'EJJf,D%**% 'yy dE "tyy'> dii '( : r$c |j}|j}|tur |d|znp|tur |d|zn[||}|,|r|t ||D]}t |||d|n(|d|zt |j} | s|r|rCt|jdD]$\} } | rd| z} |d| d t| d &| D]^\} } t| tr | j} t| tr|| j} n t| } |d || d | d `|s t|s|sA|d |r|t ||D]}t |||d||d |zd zn|d|jr|t |jyy)N rrc |dSNrr#xs r%rz _serialize_xml..hQqTr$ryr xmlns=""rr)r'r=rr _escape_cdata_serialize_xmllistrsorted_escape_attribr,rrBr>) rr?rrlrkwargsr'r=rervks r%rrRs ((C 99D g~ kD ! % % hoSk ;mD)*ua4HJ #) &E  &z'7'7'9+9!;1 #aA*1- !;"DAq!!U+FF!!U+"166N*1-&)Q78"s4y(<c --.A"5!VT8LNdSj3&'e  yy mDII&'r$>brhrcolimgwbrareabaselinkmetaembedframeinputparamtrackrisindexbasefontc |j}|j}|tur|dt|zn|tur|dt|znj||}|*|r|t||D]}t |||dn9|d|zt |j}|s|r|rCt|jdD]$\} } | rd| z} |d| dt| d &|D]^\} } t| tr | j} t| tr|| j} n t| } |d || d| d `|d |j} |r$| d k(s| d k(r ||n|t||D]}t |||d| tvr|d|zd z|jr|t|jyy)Nrrrc |dSr r#r s r%rz!_serialize_html..r r$rrrrrrrscriptstyler)r'r=rrr_serialize_htmlrrrrr,r_escape_attrib_htmlr HTML_EMPTYr>) rr?rrlrr'r=rerrrltags r%r/r/s ((C 99D g~ kM$//0 % % ht,,-Sk ;mD)*q&$7 #) &E  &z'7'7'9+9!;1 #aA*1- !;"DAq!!U+FF!!U+"166N/2&)Q78" #J99;D8#tw$K--.q&$7:%dSj3&' yy mDII&'r$c||jD] }|| |jr||jyyr:)rr>)rr?parts r%rrs1  d   yy diir$)rhtmlr=c tjd|r tdttj D]\}}||k(s||k(st|=|t|<y)Nzns\d+$z'Prefix format reserved for internal use)rematchrrrr)rrrrs r%rrs`  xx 6"BCC^))+,1 8qF{q!-!N3r$rr5rdfwsdlxsxsidc)$http://www.w3.org/XML/1998/namespacezhttp://www.w3.org/1999/xhtmlz+http://www.w3.org/1999/02/22-rdf-syntax-ns#z http://schemas.xmlsoap.org/wsdl/z http://www.w3.org/2001/XMLSchemaz)http://www.w3.org/2001/XMLSchema-instancez http://purl.org/dc/elements/1.1/cLtd|dt|jd)Nzcannot serialize z (type ))r.rdr rs r%rrs! +/d1D1DE  r$c d|vr|jdd}d|vr|jdd}d|vr|jdd}|S#ttf$rt|YywxYw)N&&r<r>replacer.rrrs r%rrso ) $;<<W-D $;<<V,D $;<<V,D ~ &)"4()AAA#"A#c| d|vr|jdd}d|vr|jdd}d|vr|jdd}d|vr|jdd}d |vr|jd d }d |vr|jd d }d |vr|jd d}|S#ttf$rt|YywxYw)NrBrCrrDrrEr" z rz  z rFrs r%rrs) $;<<W-D $;<<V,D $;<<V,D 4<<<h/D 4<<<g.D 4<<<g.D 4<<<g.D ~ &)"4()sBBB;:B;c d|vr|jdd}d|vr|jdd}d|vr|jdd}|S#ttf$rt|YywxYw)NrBrCrrErrJrFrs r%r0r0sm ) $;<<W-D $;<<V,D 4<<<h/D ~ &)"4()rHT)rrrc |dk(rtjntj}t|j |||||||j S)Nrrrrr)rStringIOBytesIOrrgetvalue)r)rrrrrstreams r%rr+s[ ')3R[[]Fvx/>1B&,4H J ?? r$c,eZdZ dZdZdZdZdZy)_ListDataStreamc||_yr:)lst)r2rWs r%r4z_ListDataStream.__init__Es r$cyrr#r7s r%rz_ListDataStream.writableHr$cyrr#r7s r%rz_ListDataStream.seekableKrYr$c:|jj|yr:)rWrZ)r2bs r%rz_ListDataStream.writeNs r$c,t|jSr:)rBrWr7s r%rz_ListDataStream.tellQs488}r$N)r r!r"r4rrrrr#r$r%rUrUCsAr$rUc`g}t|}t|j|||||||S)NrO)rUrr)r)rrrrrrWrSs r%rrTsC C S !Fvx/>1B&,4H J Jr$c t|ts t|}|jtjd|j j }|r|ddk7r tjjdyy)Nr)rr)r,rrsysstdoutrr>)r?r>s r%rrasg dK (4 JJszzIJ. <<>  D 48t# $r$c t|tr|j}|dkrtd|t |syd|zzgfd|dy)Nrz,Initial indentation level must be >= 0, got rc|dz} |}|jr|jjs||_|D]D}t |r |||j r|j jr>||_Fj js ||_yy#t$r|z}j|YwxYwr ) IndexErrorrZr=striprBr>)r?level child_levelchild_indentationchild_indent_children indentationsspaces r%rkz indent.._indent_childrensai  3 ,[ 9  yy  1)DIE5z  4::UZZ%5%5%7. zz!%e,EJ" 3 ,U 3e ;     1 2 3sB))"C C)r,rrrrB)treermrgrkrls ` @@r%rrtsg $ $||~ qyGwOPP t955=()L-,T1r$c@ t}|j|||Sr:)rr )rrrns r%r r s# =DJJvv Kr$c t||tdstddndfdGfddtjj }|}d|_tj||S) N)events_parserrrTFc3\K jEd{|jd}|snj|>j}jEd{}|||_r|j yy7v7*#r|j wwxYww)Ni@) read_eventsrr_close_and_return_rootrootr)rrrvitr pullparserwrs r%iteratorziterparse..iterators %11333{{9-% 446D!--/ / /B~ 4 0  s?B,BBA B'B(B<B,BBB))B,cBeZdZWWjZfdZy)$iterparse..IterParseIteratorc,rjyyr:)r)r2rrs r%__del__z,iterparse..IterParseIterator.__del__s r$N)r r!r"__next__r~)rrzrsr%IterParseIteratorr|sF#,, r$r) rr(r collectionsabcIteratorrvweakrefref) rrqrrrwrrzrxrys ` @@@@r%r r sy  ff=J 66 "fd#  $KOO44  BBG RB Ir$c8eZdZd dddZdZdZdZdZdZy) rN)rrctj|_|xstt |_|d}|j j |j|y)Nr)end)rdeque _events_queuerrrr _setevents)r2rqrrs r%r4zXMLPullParser.__init__sL )..0A);="A >F  2 2F;r$c |j td|r |jj|yy#t$r%}|jj |Yd}~yd}~wwxYw)Nz!feed() called after end of stream)rrrr SyntaxErrorrrZ)r2rexcs r%rzXMLPullParser.feedsc* << @A A  / !!$'  /""))#.. /s9 A'A""A'cH|jj}d|_|Sr:)rrr)r2rvs r%ruz$XMLPullParser._close_and_return_roots ||!!#  r$c& |jyr:)rur7s r%rzXMLPullParser.closes ##%r$c#~K |j}|r*|j}t|tr|||r)yywr:)rpopleftr, Exception)r2rqevents r%rtzXMLPullParser.read_eventss@ ##NN$E%+  s8==cf|j td|jjy)Nz"flush() called after end of stream)rrrflushr7s r%rzXMLPullParser.flush$s( << AB B r$r:) r r!r"r4rrurrtrr#r$r%rrs' r$c |stt}|j||j}i}|j D]}|j d}|s|||<||fS)Nrr6)rrrrrrx)r=rrnidsr?r6s r%rr;si +-0 KK <<>D C  XXd^ CG 9r$c |stt}|D]}|j||jSrr)sequencerr=s r%rrSs: +-0 D <<>r$cTeZdZ d ddddddZdZdZdZdZd Zd Z d d Z d Z y)rNF)comment_factory pi_factoryinsert_comments insert_piscg|_g|_d|_d|_d|_|t }||_||_|t}||_ ||_ |t}||_ yr:) _data_elem_lastr_tailr_comment_factoryrr _pi_factoryrr_factory)r2element_factoryrrrrs r%r4zTreeBuilder.__init__ysn      "%O /.  .J%$  "%O' r$c |jSr:rr7s r%rzTreeBuilder.closesIzzr$c|jr^|jJdj|j}|jr||j_n||j_g|_yyNr)rrjoinrr>r=r2r=s r%_flushzTreeBuilder._flushsP ::zz%wwtzz*::&*DJJO'+DJJODJ r$c< |jj|yr:)rrZr2rs r%rzTreeBuilder.datas* $r$c |j|j||x|_}|jr|jdj |n|j ||_|jj |d|_|S)Nr`r)rrrrrZrr)r2r'attrsr?s r%startzTreeBuilder.startsu  MM#u55 T :: JJrN ! !$ ' ZZ DJ $  r$c |j|jj|_d|_|jSr )rrpoprrrs r%rzTreeBuilder.ends7 ZZ^^%  zzr$cR |j|j|j|Sr:)_handle_singlerrrs r%commentzTreeBuilder.comments/ ""  ! !4#7#7? ?r$cT |j|j|j||Sr:)rrr)r2rr=s r%pizTreeBuilder.pis/ ""   doovt= =r$c||}|rH|j||_|jr|jdj|d|_|S)Nr`r)rrrrZr)r2factoryraargsr?s r%rzTreeBuilder._handle_singlesG~  KKMDJzz 2%%d+DJ r$r:) r r!r"r4rrrrrrrrr#r$r%rresC&(!%$!&5((  " ?=r$rc^eZdZ ddddZdZdZdZdZdZd Z d Z d Z d Z d Z dZy)rN)rrcJ ddlm}|j |d}| t }|x|_|_|x|_|_ |j|_ i|_ |j|_t|dr|j |_t|dr|j$|_t|dr|j(|_t|dr|j,|_t|d r|j0|_t|d r|j4|_t|d r|j8|_d |_d |_d|_ i|_! d |jDz|_#y#t$r" ddl}n#t$r tdwxYwYwxYw#tH$rYywxYw)Nrexpatz7No module named expat; use SimpleXMLTreeBuilder insteadrrrstart_nsend_nsrrrrzExpat %d.%d.%d)% xml.parsersr ImportErrorpyexpat ParserCreaterrrrr_targeterror_error_names_defaultDefaultHandlerExpandr(_startStartElementHandler_endEndElementHandler _start_nsStartNamespaceDeclHandler_end_nsEndNamespaceDeclHandlerrCharacterDataHandlerrCommentHandlerrProcessingInstructionHandler buffer_textordered_attributes_doctypeentity version_infoversionr)r2rrrrs r%r4zXMLParser.__init__s  )##Hc2 > ]F%++ dl%++ dlkk  &*mm# 67 #)-F & 65 !'+yyF $ 6: &/3~~F , 68 $-1\\F * 66 "*0++F ' 69 %$*NNF ! 64 28))F /$%!   +e.@.@@DLM  ' !M ( N   s;E(F( F2E76F7F  FF F"!F"c|j}|j}|D]}|dk(r d|_|||jfd}||_(|dk(r|||j fd}||_F|dk(r6t|jdr|||jfd}n||fd }||_ |d k(r6t|jd r|||jfd }n||fd }||_ |dk(r|||fd}||_ |dk(r|||fd}||_td|zy)Nrrc&|||||fyr:r#)r' attrib_inrrZrs r%handlerz%XMLParser._setevents..handler"sE5i#89:r$rc$||||fyr:r#)r'rrZrs r%rz%XMLParser._setevents..handler'sE3s8,-r$zstart-nsrc&|||||fyr:r#)rrrrZrs r%rz%XMLParser._setevents..handler.sx'<=>r$c,|||xsd|xsdffyrr#)rrrrZs r%rz%XMLParser._setevents..handler2s "ciR'@ABr$zend-nsrc$||||fyr:r#)rrrZrs r%rz%XMLParser._setevents..handler8svf~67r$c||dfyr:r#)rrrZs r%rz%XMLParser._setevents..handler<st}-r$rcJ|||jj|fyr:)rr)r=rrZr2s r%rz%XMLParser._setevents..handler@sE4;;#6#6t#<=>r$rcL|||jj||fyr:)rr) pi_targetrrrZr2s r%rz%XMLParser._setevents..handlerDsE4;;>>)T#BCDr$zunknown event %r)rrrZrrrrrr(rrrrrrrr)r2 events_queueevents_to_reportrrZ event_namers r%rzXMLParser._seteventss5$$*JW$,-)2fC3:0x'4;;1.8'+||8/9.18.y((26?(/%t#3=f!%E7>3 !3j!@AAU+r$cxt|}|j|_|j|jf|_|r:)r codelinenooffsetposition)r2r{errs r% _raiseerrorzXMLParser._raiseerrorKs0::||U\\1  r$cz |j|}|S#t$r|}d|vrd|z}||j|<Y|SwxYw)Nrr)rKeyError)r2rynames r%_fixnamezXMLParser._fixnameQsU $;;s#D   $Dd{Tz#DKK   $s #::cJ|jj|xsd|xsdSr)rrr2rrs r%rzXMLParser._start_ns\s!{{##FLb#)<;B =A>>B Bcx|jj} |jjd|jjdd|jj|y#|j$r}|j |Yd}~Ad}~wwxYw#|jj|wxYw)NFr$)rGetReparseDeferralEnabledSetReparseDeferralEnabledrrr)r2 was_enabledrs r%rzXMLParser.flushskk;;=  ? KK 1 1% 8 KK  c5 ) KK 1 1+ >{{   Q    KK 1 1+ >s)7A//B>BBBBB9)r r!r"r4rrrrrrrrrrrr#r$r%rrsN"&+Z3Bj =0 .34%l *"?r$r)out from_filec $ | | tdd}|tjx}}tt |j fi|}|"|j ||jn| t||||jSdS)Nz:Either 'xml_data' or 'from_file' must be provided as inputr)r) rrrPrrrrrr rR)xml_datarroptionssiors r%rrs I-UVV C {KKM!c .syyDGD EF H    i' _3<<>6$6r$z ^\w+:\w+$ceZdZ dddddddddZefdZdZddZdZd jfd Z d Z d Z dd Z dZdZdZy)rFN) with_comments strip_textrewrite_prefixesqname_aware_tagsqname_aware_attrs exclude_attrs exclude_tagsc2||_g|_||_||_|r t |nd|_|r t |nd|_||_|rt ||_nd|_|rt |j|_ nd|_ dgg|_ g|_ |s6|jjttj!|jjgi|_dg|_d|_d|_d|_d|_y)N)r>rFr)_writer_with_comments _strip_textr|_exclude_attrs _exclude_tags_rewrite_prefixes_qname_aware_tags intersection_find_qname_aware_attrs_declared_ns_stack _ns_stackrZrrr _prefix_map_preserve_space_pending_start _root_seen _root_done_ignored_depth) r2rr$r%r&r'r(r)r*s r%r4zC14NWriterTarget.__init__s  +%4Ac-0t2>S.D!1 %()9%:D "%)D " +./@+A+N+ND (+/D ( <$ #  NN ! !$~';';'="> ? b! %w"r$c#DK||D]}|s|Ed{y7wr:r#)r2ns_stack _reversedrls r%_iter_namespacesz!C14NWriterTarget._iter_namespaces(s$#H-J%%%.%s   c|jdd\}}|j|jD]\}}||k(s d|d|cStd|d|d)NrrrrzPrefix z of QName "" is not declared in scope)splitr@r6r)r2 prefixed_namerrrps r%_resolve_prefix_namez%C14NWriterTarget._resolve_prefix_name-sl$**32 ++DNN;FCF{C54&))<76(+m_D^_``r$c|%|dddk(r|ddjddnd|f\}}n|}t}|j|jD]/\}}||k(r||vr|r|d|n|||fcS|j |1|j ro||j vr|j |}n'dt|j x}|j |<|jdj||f|d|||fS|s d|vr|||fS|j|jD]:\}}||k(s |jdj||f|r|d|n|||fcS|s|||fStd|d ) Nrrrrrrr`z Namespace "rB) rr|r@r5addr1r7rBrZr6r)r2rrr' prefixes_seenurs r%_qnamezC14NWriterTarget._qname4s ;38!93CuQRy''Q/"eHCC ..t/F/FGIAvCxF-7,2&3%(S#EE   f %H  ! !d&&&))#.34S9I9I5J4K1LL))#.  # #B ' . .V} =XQse$c3. .r.S= ..t~~>IAvCx''+22C=A,2&3%(S#EE? S= ;se+EFGGr$cT|js|jj|yyr:)r<rrZrs r%rzC14NWriterTarget.dataYs""" JJ  d ##r$rc||j}|jdd=|jr|jds|j}|j<|jdc}|_|r t |r|nd}|j g|||y|r(|jr|jt|yyyNr`) rr.r8rfr9_looks_like_prefix_namerr:r,_escape_cdata_c14n)r2 _join_textrr qname_texts r%rzC14NWriterTarget._flush]s$**% JJqM   D$8$8$<::D   C/r$c |j4|r2|jDcic]\}}||jvs||}}}|h|}i}|'|j|x} ||<|j| |jX|rV|j |} | r@| D]:} || } t | s|j| x} || <|j| <nd} nd} |j } t|dDcic] }|| | }}|r.|Dcgc]\}}|rd|znd|f}}}|jng}|rVt|jD]:\}}| || vr||vr |||d}||\}} }|j|r|n| |f<|jd}|jj|r|dk(n|jd|j}|d ||dz|r:|d j|Dcgc]\}}d |d t|d c}}|d||t|||dd|_|j"jgycc}}wcc}wcc}}wcc}}w)Nc&|jddS)Nrr)rC)rs r%rz)C14NWriterTarget._start..s!''#q/r$rzxmlns:xmlnsrz+{http://www.w3.org/XML/1998/namespace}spacepreserver`rrrrrrT)r/rrFrHr4rOrKrsortrZrxr8r,r_escape_attrib_c14nrPr:r6)r2r'rrUrRrrrresolved_namesrqattrs attr_namer{ parse_qnamer parsed_qnamesrrr attr_qnamespace_behaviourrs r%rzC14NWriterTarget._starts    *u&+kkmTmdaq@S@S7SQTmET  !151J1J:1V VEN:. JJu   ' ' 311%8F!'I!),E.u58<8Q8QRW8XXu 5 5) "( Fkk 4: 153453qKN*53 4 $2#1KC'-F"'3?#1  NN I u{{}-1%!v+!~:M%nQ&78;A-:1-=* Is  *A!FG . ))$QR ##-*3M%Nq%QR S b!CU04 8UsI/I/3I5 I:Jc|jr|xjdzc_y|jr|j|jd|j |dd|j j t|j dk(|_|jj |jj y)Nrrrr) r<rrr,rKr8rrBr;r5r6rs r%rzC14NWriterTarget.ends      1 $   :: KKM bS)!,-Q/0   "d223q8 ##% r$c<|jsy|jry|jr|jdn(|jr|j r|j |jdt|d|js|jdyy)Nrz)r-r<r;r,r:rrrPrs r%rzC14NWriterTarget.commentsw""      ?? KK  __ KKM d-d34C89 KK r$c8|jry|jr|jdn(|jr|jr|j |j|rd|dt |dnd|d|js|jdyy)Nrz)r<r;r,r:rrrP)r2rrs r%rzC14NWriterTarget.pis     ?? KK  __ KKM :>b,T232 6bPRO U KK r$r:)r r!r"r4reversedr@rFrKrrrrrrrrrr#r$r%rrsj, %"&$#$# J4<& a#HJ$!# 210"C"J   r$rc d|vr|jdd}d|vr|jdd}d|vr|jdd}d|vr|jdd}|S#ttf$rt|YywxYw) NrBrCrrDrrErK rFrs r%rPrPs) $;<<W-D $;<<V,D $;<<V,D 4<<<g.D ~ &)"4()sAAA98A9cP d|vr|jdd}d|vr|jdd}d|vr|jdd}d|vr|jdd}d |vr|jd d }d |vr|jd d }|S#ttf$rt|YywxYw) NrBrCrrDrrJrLz rz rKrhrFrs r%r[r[s) $;<<W-D $;<<V,D $;<<X.D 4<<<g.D 4<<<g.D 4<<<g.D ~ &)"4()sBBB%$B%)r)_set_factoriesr:r)z r)?__all__rrar7rHrrcollections.abcrrrrrr r rrrrr rrcontextmanagerrrrr1r/rrrrrrrr0rrrUrrrr r rrrrrrrrcompileUNICODEr8rOrrPr[rc _elementtreerjrr#r$r%rqs!P (       # ^^B $&$  +"+"`\/\/B /+/+b;z0(d 0(d    !*-2$*38(.(,16(, %3! ) )8 )!T"&0b''" !%&* &/l 5p77t",  $vvth?h?Z7tt7<%"**\2::>DDD)&). 3K+712  s E++E32E3PK![0__pycache__/ElementInclude.cpython-312.opt-1.pycnu[ ֦i(ddlZddlmZddlmZdZedzZedzZdZGd d e Z Gd d e Z dd Z ddefdZ dZy)N) ElementTree)urljoinz!{http://www.w3.org/2001/XInclude}includefallbackc eZdZy)FatalIncludeErrorN__name__ __module__ __qualname__1/usr/lib64/python3.12/xml/etree/ElementInclude.pyr r Crr c eZdZy)LimitedRecursiveIncludeErrorNr rrrrrGrrrc|dk(r:t|d5}tj|j}ddd|S|sd}t|d|5}|j }ddd|S#1swYSxYw#1swYSxYw)NxmlrbzUTF-8r)encoding)openrparsegetrootread)hrefrrfiledatas rdefault_loaderr!Ws ~ $ $$T*224D K H $h /499;D0 K K0 Ks$A-A:-A7:Bc|d}n|dkrtd|zt|dr|j}|t}t ||||t y)Nrz;expected non-negative depth or None for 'max_depth', got %rr) ValueErrorhasattrrr!_includeset)elemloaderbase_url max_depths rrrusW QVYbbcctY||~ ~ T68Y6rcd}|t|kr||}|jtk(r|jd}|r t ||}|jdd}|dk(r||vrt d|z|dk(rt d|z|j||||} | t d|d|tj| } t| |||d z ||j||jr"| jxsd |jz| _ | ||<n|d k(r||||jd } | t d|d||jr| |jz } |r!||d z } | jxsd | z| _ n|jxsd | z|_ ||=t d |z|jtk(rt d|jzt||||||d z }|t|kryy)Nrrrrzrecursive include of %sz5maximum xinclude depth reached when including file %sz cannot load z as rtextrz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r))lentagXINCLUDE_INCLUDEgetrr raddcopyr&removetailr.XINCLUDE_FALLBACK) r(r)r*r+ _parent_hrefsierrnoder.s rr&r&s A c$i- G 55$ $55=Dx.EE'5)E~=(+,E,LMM>6ORVVXX!!$'dE*<+26>yyvtY]MJ$$T*66!%bAFF :DIQ&dE155+<=<+26>66AFFND!9D!%bD 8DI!%bD 8DIG'?%GUU' '#BQUUJ  Q)] C Qg c$i-r)N)r4r-r urllib.parserXINCLUDEr1r7DEFAULT_MAX_INCLUSION_DEPTH SyntaxErrorr rr!rr&rrrr@sff  .i'z)     #4 <1 76rPK!Eq7A7A'__pycache__/ElementTree.cpython-312.pycnu[ ֦i!!dZgdZdZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl m Z Gdde Zd ZGd d Zifd ZdCd ZdCdZeZGddZGddZe j.dZdCdZdZhdZdZdZeeedZdZdddddd d!d"Z e e_ d#Z!d$Z"d%Z#d&Z$dDddd'd(d)Z%Gd*d+ejLZ'dDddd'd(d,Z(d-Z)dEd.Z*dCd/Z+dDd0Z,Gd1d2Z-dCd3Z.dCd4Z/e.Z0dCd5Z1Gd6d7Z2Gd8d9Z3dCddd:d;Z4ejjdZ9d?Z:d@Z; eZZ>e>eey#e?$rYywxYw)FaLightweight XML support for Python. XML is an inherently hierarchical data format, and the most natural way to represent it is with a tree. This module has two classes for this purpose: 1. ElementTree represents the whole XML document as a tree and 2. Element represents a single node in this tree. Interactions with the whole document (reading and writing to/from files) are usually done on the ElementTree level. Interactions with a single XML element and its sub-elements are done on the Element level. Element is a flexible container object designed to store hierarchical data structures in memory. It can be described as a cross between a list and a dictionary. Each Element has a number of properties associated with it: 'tag' - a string containing the element's name. 'attributes' - a Python dictionary storing the element's attributes. 'text' - a string containing the element's text content. 'tail' - an optional string containing text after the element's end tag. And a number of child elements stored in a Python sequence. To create an element instance, use the Element constructor, or the SubElement factory function. You can also use the ElementTree class to wrap an element structure and convert it to and from XML. )CommentdumpElement ElementTree fromstringfromstringlistindent iselement iterparseparse ParseErrorPIProcessingInstructionQName SubElementtostring tostringlist TreeBuilderVERSIONXMLXMLID XMLParser XMLPullParserregister_namespace canonicalizeC14NWriterTargetz1.3.0N) ElementPathceZdZdZy)r zAn error when parsing an XML document. In addition to its exception value, a ParseError contains two extra attributes: 'code' - the specific exception code 'position' - the line and column of the error N)__name__ __module__ __qualname____doc__./usr/lib64/python3.12/xml/etree/ElementTree.pyr r ks  r%r ct|dS)z2Return True if *element* appears to be an Element.tag)hasattr)elements r&r r ys 7E ""r%ceZdZdZdZ dZ dZ dZ ifdZdZ dZ dZ dZ dZ d Zd Zd Zd Zd ZdZdZdZddZddZddZddZdZddZdZdZdZddZdZ y)rahAn XML element. This class is the reference implementation of the Element interface. An element's length is its number of subelements. That means if you want to check if an element is truly empty, you should check BOTH its length AND its text attribute. The element tag, attribute names, and attribute values can be either bytes or strings. *tag* is the element name. *attrib* is an optional dictionary containing element attributes. *extra* are additional element attributes given as keyword arguments. Example form: text...tail Nc t|ts"td|jj||_i|||_g|_y)Nzattrib must be dict, not ) isinstancedict TypeError __class__r r(attrib _children)selfr(r1extras r&__init__zElement.__init__sL&$'  )),- -))5) r%c`d|jj|jt|fzS)Nz<%s %r at %#x>)r0r r(idr3s r&__repr__zElement.__repr__s&4>>#:#:DHHbh"OOOr%c&|j||S)zCreate a new element with the same type. *tag* is a string containing the element name. *attrib* is a dictionary containing the element attributes. Do not call this method, use the SubElement factory function instead. )r0)r3r(r1s r& makeelementzElement.makeelements~~c6**r%c|j|j|j}|j|_|j|_||dd|SN)r;r(r1texttail)r3elems r&__copy__zElement.__copy__s@$++6II II Q r%c,t|jSr=)lenr2r8s r&__len__zElement.__len__s4>>""r%cjtjdtdt|jdk7S)NzTesting an element's truth value will always return True in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. stacklevelr)warningswarnDeprecationWarningrCr2r8s r&__bool__zElement.__bool__s1  K 1   4>>"a''r%c |j|Sr=r2r3indexs r& __getitem__zElement.__getitem__s~~e$$r%ct|tr|D]}|j|n|j|||j|<yr=)r-slice_assert_is_elementr2)r3rPr*elts r& __setitem__zElement.__setitem__sB eU #'',  # #G , 'ur%c|j|=yr=rNrOs r& __delitem__zElement.__delitem__s NN5 !r%c\|j||jj|y)aAdd *subelement* to the end of this element. The new element will appear in document order after the last existing subelement (or directly after the text, if it's the first subelement), but before the end tag for this element. NrTr2appendr3 subelements r&r[zElement.appends$  + j)r%cj|D].}|j||jj|0y)zkAppend subelements from a sequence. *elements* is a sequence with zero or more elements. NrZ)r3elementsr*s r&extendzElement.extends.  G  # #G , NN ! !' * r%c^|j||jj||y)z(Insert *subelement* at position *index*.N)rTr2insert)r3rPr]s r&rbzElement.inserts$  + eZ0r%cft|ts!tdt|jzy)Nzexpected an Element, not %s)r- _Element_Pyr/typer )r3es r&rTzElement._assert_is_elements.![)9DGr?r8s r&rwz Element.clear?s)  $$ DIr%c:|jj||S)agGet element attribute. Equivalent to attrib.get, but some implementations may handle this a bit more efficiently. *key* is what attribute to look for, and *default* is what to return if the attribute was not found. Returns a string containing the attribute value, or the default if attribute was not found. )r1get)r3keyrqs r&ryz Element.getJs{{sG,,r%c"||j|<y)zSet element attribute. Equivalent to attrib[key] = value, but some implementations may handle this a bit more efficiently. *key* is what attribute to set, and *value* is the attribute value to set it to. N)r1)r3rzvalues r&setz Element.setWs! Cr%c6|jjS)zGet list of attribute names. Names are returned in an arbitrary order, just like an ordinary Python dict. Equivalent to attrib.keys() )r1keysr8s r&rz Element.keysas{{!!r%c6|jjS)zGet element attributes as a sequence. The attributes are returned in arbitrary order. Equivalent to attrib.items(). Return a list of (name, value) tuples. )r1itemsr8s r&rz Element.itemsjs{{  ""r%c#K|dk(rd}||j|k(r||jD]}|j|Ed{y7w)aCreate tree iterator. The iterator loops over the element and all subelements in document order, returning all elements with a matching tag. If the tree structure is modified during iteration, new or removed elements may or may not be included. To get a stable set, use the list() function on the iterator, and loop over the resulting list. *tag* is what tags to look for (default is to return all elements) Return an iterator containing all the matching elements. *N)r(r2iter)r3r(rfs r&rz Element.iterusJ #:C ;$((c/JAvvc{ " " "sAA A A c#K|j}t|ts|y|j}|r||D]-}|j Ed{|j }|s*|/y7w)zCreate text iterator. The iterator loops over the element and all subelements in document order, returning all inner text. N)r(r-strr>itertextr?)r3r(trfs r&rzElement.itertexts`hh#s#  II GAzz| # #A  #sA A) A' A) A)r=NN)!r r!r"r#r(r1r>r?r5r9r;rArDrLrQrVrXr[r`rbrTrhrjrorsrurwryr}rrrrr$r%r&rr~s( C F1 D D$&P +#(%(" *+1 N * 8 E ; < % -!" ##,r%rc Xi||}|j||}|j||S)aSubelement factory which creates an element instance, and appends it to an existing parent. The element tag, attribute names, and attribute values can be either bytes or Unicode strings. *parent* is the parent element, *tag* is the subelements name, *attrib* is an optional directory containing element attributes, *extra* are additional attributes given as keyword arguments. )r;r[)parentr(r1r4r*s r&rrs6! % F  f-G MM' Nr%c2tt}||_|S)zComment element factory. This function creates a special element which the standard serializer serializes as an XML comment. *text* is a string containing the comment string. )rrr>)r>r*s r&rrsgGGL Nr%cdtt}||_|r|jdz|z|_|S)a*Processing Instruction element factory. This function creates a special element which the standard serializer serializes as an XML comment. *target* is a string containing the processing instruction, *text* is a string containing the processing instruction contents, if any.  )rrr>)targetr>r*s r&rrs3+,GGL ||c)D0 Nr%cHeZdZdZd dZdZdZdZdZdZ d Z d Z d Z y) raQualified name wrapper. This class can be used to wrap a QName attribute value in order to get proper namespace handing on output. *text_or_uri* is a string containing the QName value either in the form {uri}local, or if the tag argument is given, the URI part of a QName. *tag* is an optional argument which if given, will make the first argument (text_or_uri) be interpreted as a URI, and this argument (tag) be interpreted as a local name. Nc&|rd|d|}||_y)N{}r>)r3 text_or_urir(s r&r5zQName.__init__s &137K r%c|jSr=rr8s r&__str__z QName.__str__s yyr%cPd|jjd|jdS)N)r0r r>r8s r&r9zQName.__repr__s NN33TYY??r%c,t|jSr=)hashr>r8s r&__hash__zQName.__hash__sDIIr%crt|tr|j|jkS|j|kSr=r-rr>r3others r&__le__z QName.__le__. eU #99 * *yyE!!r%crt|tr|j|jkS|j|kSr=rrs r&__lt__z QName.__lt__. eU #99uzz) )yy5  r%crt|tr|j|jk\S|j|k\Sr=rrs r&__ge__z QName.__ge__rr%crt|tr|j|jkDS|j|kDSr=rrs r&__gt__z QName.__gt__rr%crt|tr|j|jk(S|j|k(Sr=rrs r&__eq__z QName.__eq__rr%r=) r r!r"r#r5rr9rrrrrrr$r%r&rrs5  @"!"!"r%rcpeZdZdZddZdZdZddZddZddZ dd Z dd Z dd Z dd d dZ dZy)ra%An XML element hierarchy. This class also provides support for serialization to and from standard XML. *element* is an optional root element node, *file* is an optional file handle or file name of an XML file whose contents will be used to initialize the tree with. Nc:||_|r|j|yyr=)_rootr )r3r*files r&r5zElementTree.__init__ s  JJt  r%c|jS)z!Return root element of this tree.rr8s r&getrootzElementTree.getroots zzr%c||_y)zReplace root element of this tree. This will discard the current contents of the tree and replace it with the given element. Use with care! Nr)r3r*s r&_setrootzElementTree._setroots  r%cd}t|dst|d}d} |Kt}t|dr5|j||_|j|r|j SS|j dx}r%|j||j dx}r%|j |_|j|r|j SS#|r|j wwxYw)a=Load external XML document into element tree. *source* is a file name or file object, *parser* is an optional parser instance that defaults to XMLParser. ParseError is raised if the parser fails to parse the document. Returns the root element of the given source document. FreadrbT _parse_wholei)r)openrrrcloserfeed)r3sourceparser close_sourcedatas r&r zElementTree.parse!s vv&&$'FL ~"6>2 "(!4!4V! r>r) _serialize ValueError _get_writerlower_serialize_textr _namespaces) r3file_or_filenameencodingxml_declarationdefault_namespacemethodrwritedeclared_encodingqnamesrm serializes r&rzElementTree.writes:F : %069: :"% )8 48R@QO$,^^%2&,,.6KK%()tzz2%0=N%O" &v. %VZ/CE5 4 4s BCCc(|j|dS)Nr)r)r)r3rs r& write_c14nzElementTree.write_c14nszz$vz..r%rr=)NNNN)r r!r"r#r5rrr rrjrorsrurrr$r%r&rrsZ   D $1,>,4,5." $ 3E $( 3Ej/r%rc#~K |j}|jdk(r|t|ddxsdfytj5}t |t jr|}nt |t jr1t j|}|j|jnFt j}d|_ ||_ |j|_ |j|_t j ||dd}|j|j|j|fdddy#t$rYXwxYw#1swYyxYw#t$rM|jdk(rd}t#|d|d 5}|j|fdddYy#1swYYyxYwwxYww) NrrrcyNTr$r$r%r&z_get_writer..sDr%xmlcharrefreplace )rerrorsnewlinew)rr)rrgetattr contextlib ExitStackr-ioBufferedIOBase RawIOBaseBufferedWritercallbackdetachwritableseekabletellAttributeError TextIOWrapperr)rrrstackrs r&rrs-+ && >> y (!1:tDOO O%%'5.0A0AB+D 0",,?,,-=>DNN4;;/,,.D$0DM!&DJ)9(A(A $4$9$9 ''19/B046 t{{+jj(**9('&*'(' ' >> y (H "C(,.15**h& &... 'sF= E$=F= B E"E .add_qname s .RayC 9++C3S#,>+//4F~!'#j/!9*0 3/5s$;F5M$'F5M$$3!&u  . &u - .sA.B 2B 8B B"!B") rr(r-rr>rrr rr) r@rrr(rzr|r>rmrs ` @@r&rrs(D\FJ(* $%.8 hh c5 !xxv%#((# S !& # _G!32 &s +**,JC#u%hh& #%'EJJf,D%**% 'yy dE "tyy'> dii '( : r%c |j}|j}|tur |d|znp|tur |d|zn[||}|,|r|t ||D]}t |||d|n(|d|zt |j} | s|r|rCt|jdD]$\} } | rd| z} |d| d t| d &| D]^\} } t| tr | j} t| tr|| j} n t| } |d || d | d `|s t|s|sA|d |r|t ||D]}t |||d||d |zd zn|d|jr|t |jyy)N rrc |dSNrr$xs r&rz _serialize_xml..hQqTr%rzr xmlns=""rr)r(r>rr _escape_cdata_serialize_xmllistrsorted_escape_attribr-rrCr?) rr@rrmrkwargsr(r>rfrvks r&rrRs ((C 99D g~ kD ! % % hoSk ;mD)*ua4HJ #) &E  &z'7'7'9+9!;1 #aA*1- !;"DAq!!U+FF!!U+"166N*1-&)Q78"s4y(<c --.A"5!VT8LNdSj3&'e  yy mDII&'r%>brhrcolimgwbrareabaselinkmetaembedframeinputparamtrackrisindexbasefontc |j}|j}|tur|dt|zn|tur|dt|znj||}|*|r|t||D]}t |||dn9|d|zt |j}|s|r|rCt|jdD]$\} } | rd| z} |d| dt| d &|D]^\} } t| tr | j} t| tr|| j} n t| } |d || d| d `|d |j} |r$| d k(s| d k(r ||n|t||D]}t |||d| tvr|d|zd z|jr|t|jyy)Nrr rc |dSr r$r s r&rz!_serialize_html..rr%rrrrrrrscriptstyler)r(r>rrr_serialize_htmlrrrrr-r_escape_attrib_htmlr HTML_EMPTYr?) rr@rrmrr(r>rfrrrltags r&r0r0s ((C 99D g~ kM$//0 % % ht,,-Sk ;mD)*q&$7 #) &E  &z'7'7'9+9!;1 #aA*1- !;"DAq!!U+FF!!U+"166N/2&)Q78" #J99;D8#tw$K--.q&$7:%dSj3&' yy mDII&'r%c||jD] }|| |jr||jyyr=)rr?)rr@parts r&rrs1  d   yy diir%)rhtmlr>ctjd|r tdttj D]\}}||k(s||k(st|=|t|<y)atRegister a namespace prefix. The registry is global, and any existing mapping for either the given prefix or the namespace URI will be removed. *prefix* is the namespace prefix, *uri* is a namespace uri. Tags and attributes in this namespace will be serialized with prefix if possible. ValueError is raised if prefix is reserved or is invalid. zns\d+$z'Prefix format reserved for internal useN)rematchrrrr)rrrrs r&rrs[ xx 6"BCC^))+,1 8qF{q!-!N3r%rr6rdfwsdlxsxsidc)$http://www.w3.org/XML/1998/namespacezhttp://www.w3.org/1999/xhtmlz+http://www.w3.org/1999/02/22-rdf-syntax-ns#z http://schemas.xmlsoap.org/wsdl/z http://www.w3.org/2001/XMLSchemaz)http://www.w3.org/2001/XMLSchema-instancez http://purl.org/dc/elements/1.1/cLtd|dt|jd)Nzcannot serialize z (type ))r/rer rs r&rrs! +/d1D1DE  r%c d|vr|jdd}d|vr|jdd}d|vr|jdd}|S#ttf$rt|YywxYw)N&&r<r>replacer/rrrs r&rrso ) $;<<W-D $;<<V,D $;<<V,D ~ &)"4()AAA#"A#c| d|vr|jdd}d|vr|jdd}d|vr|jdd}d|vr|jdd}d |vr|jd d }d |vr|jd d }d |vr|jd d}|S#ttf$rt|YywxYw)NrCrDrrErrFr" z rz  z rGrs r&rrs) $;<<W-D $;<<V,D $;<<V,D 4<<<h/D 4<<<g.D 4<<<g.D 4<<<g.D ~ &)"4()sBBB;:B;c d|vr|jdd}d|vr|jdd}d|vr|jdd}|S#ttf$rt|YywxYw)NrCrDrrFrrKrGrs r&r1r1sm ) $;<<W-D $;<<V,D 4<<<h/D ~ &)"4()rIT)rrrc|dk(rtjntj}t|j |||||||j S)a Generate string representation of XML element. All subelements are included. If encoding is "unicode", a string is returned. Otherwise a bytestring is returned. *element* is an Element instance, *encoding* is an optional output encoding defaulting to US-ASCII, *method* is an optional output which can be one of "xml" (default), "html", "text" or "c14n", *default_namespace* sets the default XML namespace (for "xmlns"). Returns an (optionally) encoded string containing the XML data. rrrrr)rStringIOBytesIOrrgetvalue)r*rrrrrstreams r&rr+sV ')3R[[]Fvx/>1B&,4H J ?? r%c.eZdZdZdZdZdZdZdZy)_ListDataStreamz7An auxiliary stream accumulating into a list reference.c||_yr=)lst)r3rXs r&r5z_ListDataStream.__init__Es r%cyrr$r8s r&rz_ListDataStream.writableHr%cyrr$r8s r&rz_ListDataStream.seekableKrZr%c:|jj|yr=)rXr[)r3bs r&rz_ListDataStream.writeNs r%c,t|jSr=)rCrXr8s r&rz_ListDataStream.tellQs488}r%N) r r!r"r#r5rrrrr$r%r&rVrVCsAr%rVc`g}t|}t|j|||||||S)NrP)rVrr)r*rrrrrrXrTs r&rrTsC C S !Fvx/>1B&,4H J Jr%ct|ts t|}|jtjd|j j }|r|ddk7r tjjdyy)a#Write element tree or element structure to sys.stdout. This function should be used for debugging only. *elem* is either an ElementTree, or a single Element. The exact output format is implementation dependent. In this version, it's written as an ordinary XML file. r)rrN)r-rrsysstdoutrr?)r@r?s r&rrasb dK (4 JJszzIJ. <<>  D 48t# $r%ct|tr|j}|dkrtd|t |syd|zzgfd|dy)a&Indent an XML document by inserting newlines and indentation space after elements. *tree* is the ElementTree or Element to modify. The (root) element itself will not be changed, but the tail text of all elements in its subtree will be adapted. *space* is the whitespace to insert for each indentation level, two space characters by default. *level* is the initial indentation level. Setting this to a higher value than 0 can be used for indenting subtrees that are more deeply nested inside of a document. rz,Initial indentation level must be >= 0, got Nrc|dz} |}|jr|jjs||_|D]D}t |r |||j r|j jr>||_Fj js ||_yy#t$r|z}j|YwxYwr ) IndexErrorr[r>striprCr?)r@level child_levelchild_indentationchild_indent_children indentationsspaces r&rlz indent.._indent_childrensai  3 ,[ 9  yy  1)DIE5z  4::UZZ%5%5%7. zz!%e,EJ" 3 ,U 3e ;     1 2 3sB))"C C)r-rrrrC)treernrhrlrms ` @@r&rrtsb$ $||~ qyGwOPP t955=()L-,T1r%c>t}|j|||S)zParse XML document into element tree. *source* is a filename or file object containing XML data, *parser* is an optional parser instance defaulting to XMLParser. Return an ElementTree instance. )rr )rrros r&r r s =DJJvv Kr%ct||tdstddndfdGfddtjj }|}d |_tj||S) aJIncrementally parse XML document into ElementTree. This class also reports what's going on to the user based on the *events* it is initialized with. The supported events are the strings "start", "end", "start-ns" and "end-ns" (the "ns" events are used to get detailed namespace information). If *events* is omitted, only "end" events are reported. *source* is a filename or file object containing XML data, *events* is a list of events to report back, *parser* is an optional parser instance. Returns an iterator providing (event, elem) pairs. )events_parserrrTFc3\K jEd{|jd}|snj|>j}jEd{}|||_r|j yy7v7*#r|j wwxYww)Ni@) read_eventsrr_close_and_return_rootrootr)rrrwitr pullparserwrs r&iteratorziterparse..iterators %11333{{9-% 446D!--/ / /B~ 4 0  s?B,BBA B'B(B<B,BBB))B,cBeZdZWWjZfdZy)$iterparse..IterParseIteratorc,rjyyr=)r)r3rrs r&__del__z,iterparse..IterParseIterator.__del__s r%N)r r!r"__next__r)rr{rsr&IterParseIteratorr}sF#,, r%rN) rr)r collectionsabcIteratorrwweakrefref) rrrrrrxrr{ryrzs ` @@@@r&r r st"ff=J 66 "fd#  $KOO44  BBG RB Ir%c8eZdZd dddZdZdZdZdZdZy) rN)rsctj|_|xstt |_|d}|j j |j|y)Nr)end)rdeque _events_queuerrrs _setevents)r3rrrss r&r5zXMLPullParser.__init__sL )..0A);="A >F  2 2F;r%c|j td|r |jj|yy#t$r%}|jj |Yd}~yd}~wwxYw)Feed encoded data to parser.Nz!feed() called after end of stream)rsrr SyntaxErrorrr[)r3rexcs r&rzXMLPullParser.feeds` << @A A  / !!$'  /""))#.. /s8 A&A!!A&cH|jj}d|_|Sr=)rsr)r3rws r&rvz$XMLPullParser._close_and_return_roots ||!!#  r%c$|jy)zFinish feeding data to parser. Unlike XMLParser, does not return the root element. Use read_events() to consume elements from XMLPullParser. N)rvr8s r&rzXMLPullParser.closes ##%r%c#|K|j}|r*|j}t|tr|||r)yyw)zReturn an iterator over currently available (event, elem) pairs. Events are consumed from the internal event queue as they are retrieved from the iterator. N)rpopleftr- Exception)r3rrevents r&ruzXMLPullParser.read_eventss; ##NN$E%+  s7<<cf|j td|jjy)Nz"flush() called after end of stream)rsrflushr8s r&rzXMLPullParser.flush$s( << AB B r%r=) r r!r"r5rrvrrurr$r%r&rrs' rs r&rr*s+ +-0 KK <<>r%c|stt}|j||j}i}|j D]}|j d}|s|||<||fS)aParse XML document from string constant for its IDs. *text* is a string containing XML data, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an (Element, dict) tuple, in which the dict maps element id:s to elements. rr7)rrrrrry)r>rroidsr@r7s r&rr;sd +-0 KK <<>D C  XXd^ CG 9r%c~|stt}|D]}|j||jS)zParse XML document from sequence of string fragments. *sequence* is a list of other sequence, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an Element instance. rr)sequencerr>s r&rrSs5 +-0 D <<>r%cVeZdZdZdddddddZdZdZdZd Zd Z d Z dd Z d Z y)ra8Generic element structure builder. This builder converts a sequence of start, data, and end method calls to a well-formed element structure. You can use this class to build an element structure using a custom XML parser, or a parser for some other XML-like format. *element_factory* is an optional element factory which is called to create new Element instances, as necessary. *comment_factory* is a factory to create comments to be used instead of the standard factory. If *insert_comments* is false (the default), comments will not be inserted into the tree. *pi_factory* is a factory to create processing instructions to be used instead of the standard factory. If *insert_pis* is false (the default), processing instructions will not be inserted into the tree. NF)comment_factory pi_factoryinsert_comments insert_piscg|_g|_d|_d|_d|_|t }||_||_|t}||_ ||_ |t}||_ yr=) _data_elem_lastr_tailr_comment_factoryrr _pi_factoryrr_factory)r3element_factoryrrrrs r&r5zTreeBuilder.__init__ysn      "%O /.  .J%$  "%O' r%c~t|jdk(sJd|jJd|jS)z;Flush builder buffers and return toplevel document Element.rzmissing end tagszmissing toplevel element)rCrrr8s r&rzTreeBuilder.closes>4::!#7%77#zz%A'AA%zzr%cL|jr|jdj|j}|jr/|jjJd||j_n.|jj Jd||j_g|_yy)Nrzinternal error (tail)zinternal error (text))rrjoinrr?r>r3r>s r&_flushzTreeBuilder._flushs ::zz%wwtzz*::::??2K4KK2&*DJJO::??2K4KK2&*DJJODJ r%c:|jj|y)zAdd text to current element.N)rr[r3rs r&rzTreeBuilder.datas $r%c|j|j||x|_}|jr|jdj |n|j ||_|jj |d|_|S)zOpen new element and return it. *tag* is the element name, *attrs* is a dict containing element attributes. rar)rrrrr[rr)r3r(attrsr@s r&startzTreeBuilder.startsp  MM#u55 T :: JJrN ! !$ ' ZZ DJ $  r%c|j|jj|_|jj|k(s"Jd|jjd|dd|_|jS)zOClose and return current Element. *tag* is the element name. zend tag mismatch (expected z, got rAr)rrpoprr(rrs r&rzTreeBuilder.endsa ZZ^^% zz~~$ (::>>3( ($ zzr%cP|j|j|j|S)z`Create a comment using the comment_factory. *text* is the text of the comment. )_handle_singlerrrs r&commentzTreeBuilder.comments* ""  ! !4#7#7? ?r%cR|j|j|j||S)zCreate a processing instruction using the pi_factory. *target* is the target name of the processing instruction. *text* is the data of the processing instruction, or ''. )rrr)r3rr>s r&pizTreeBuilder.pis* ""   doovt= =r%c||}|rH|j||_|jr|jdj|d|_|S)Nrar)rrrr[r)r3factoryrbargsr@s r&rzTreeBuilder._handle_singlesG~  KKMDJzz 2%%d+DJ r%r=) r r!r"r#r5rrrrrrrrr$r%r&rresC&(!%$!&5((  " ?=r%rc`eZdZdZddddZdZdZdZdZd Z d Z d Z d Z d Z dZdZy)raaElement structure builder for XML source data based on the expat parser. *target* is an optional target object which defaults to an instance of the standard TreeBuilder class, *encoding* is an optional encoding string which if given, overrides the encoding specified in the XML file: http://www.iana.org/assignments/character-sets N)rrcJ ddlm}|j |d}| t }|x|_|_|x|_|_ |j|_ i|_ |j|_t|dr|j |_t|dr|j$|_t|dr|j(|_t|dr|j,|_t|d r|j0|_t|d r|j4|_t|d r|j8|_d |_d |_d|_ i|_! d |jDz|_#y#t$r" ddl}n#t$r tdwxYwYwxYw#tH$rYywxYw)Nrexpatz7No module named expat; use SimpleXMLTreeBuilder insteadrrrstart_nsend_nsrrrrzExpat %d.%d.%d)% xml.parsersr ImportErrorpyexpat ParserCreaterrrsr_targeterror_error_names_defaultDefaultHandlerExpandr)_startStartElementHandler_endEndElementHandler _start_nsStartNamespaceDeclHandler_end_nsEndNamespaceDeclHandlerrCharacterDataHandlerrCommentHandlerrProcessingInstructionHandler buffer_textordered_attributes_doctypeentity version_infoversionr)r3rrrrs r&r5zXMLParser.__init__s  )##Hc2 > ]F%++ dl%++ dlkk  &*mm# 67 #)-F & 65 !'+yyF $ 6: &/3~~F , 68 $-1\\F * 66 "*0++F ' 69 %$*NNF ! 64 28))F /$%!   +e.@.@@DLM  ' !M ( N   s;E(F( F2E76F7F  FF F"!F"c|j}|j}|D]}|dk(r d|_|||jfd}||_(|dk(r|||j fd}||_F|dk(r6t|jdr|||jfd}n||fd }||_ |d k(r6t|jd r|||jfd }n||fd }||_ |dk(r|||fd}||_ |dk(r|||fd}||_td|zy)Nrrc&|||||fyr=r$)r( attrib_inrr[rs r&handlerz%XMLParser._setevents..handler"sE5i#89:r%rc$||||fyr=r$)r(rr[rs r&rz%XMLParser._setevents..handler'sE3s8,-r%zstart-nsrc&|||||fyr=r$)rrrr[rs r&rz%XMLParser._setevents..handler.sx'<=>r%c,|||xsd|xsdffyNrr$)rrrr[s r&rz%XMLParser._setevents..handler2s "ciR'@ABr%zend-nsrc$||||fyr=r$)rrr[rs r&rz%XMLParser._setevents..handler8svf~67r%c||dfyr=r$)rrr[s r&rz%XMLParser._setevents..handler<st}-r%rcJ|||jj|fyr=)rr)r>rr[r3s r&rz%XMLParser._setevents..handler@sE4;;#6#6t#<=>r%rcL|||jj||fyr=)rr) pi_targetrrr[r3s r&rz%XMLParser._setevents..handlerDsE4;;>>)T#BCDr%zunknown event %r)rsr[rrrrrr)rrrrrrrr)r3 events_queueevents_to_reportrr[ event_namers r&rzXMLParser._seteventss5$$*JW$,-)2fC3:0x'4;;1.8'+||8/9.18.y((26?(/%t#3=f!%E7>3 !3j!@AAU+r%cxt|}|j|_|j|jf|_|r=)r codelinenooffsetposition)r3r|errs r& _raiseerrorzXMLParser._raiseerrorKs0::||U\\1  r%cz |j|}|S#t$r|}d|vrd|z}||j|<Y|SwxYw)Nrr)rKeyError)r3rznames r&_fixnamezXMLParser._fixnameQsU $;;s#D   $Dd{Tz#DKK   $s #::cJ|jj|xsd|xsdSr)rrr3rrs r&rzXMLParser._start_ns\s!{{##FLb#)<r data_handlerrrnrerpubidsystems r&rzXMLParser._defaultqsbq S= #{{//  T[[a45s]tBQx;6DM ]] &} $ ::{{   Q    KK 1 1+ >s)7A//B>BBBBB9)r r!r"r#r5rrrrrrrrrrrr$r%r&rrsN"&+Z3Bj =0 .34%l *"?r%r)out from_filec "| | tdd}|tjx}}tt |j fi|}|"|j ||jn| t||||jSdS)a3Convert XML to its C14N 2.0 serialised form. If *out* is provided, it must be a file or file-like object that receives the serialised canonical XML output (text, not bytes) through its ``.write()`` method. To write to a file, open it in text mode with encoding "utf-8". If *out* is not provided, this function returns the output as text string. Either *xml_data* (an XML string) or *from_file* (a file path or file-like object) must be provided as input. The configuration options are the same as for the ``C14NWriterTarget``. Nz:Either 'xml_data' or 'from_file' must be provided as inputr)r) rrrQrrrrrr rS)xml_datarroptionssiors r&rrsI-UVV C {KKM!c .syyDGD EF H    i' _3<<>6$6r%z ^\w+:\w+$ceZdZdZdddddddddZefdZdZddZd Z d jfd Z d Z d Z ddZdZdZdZy)ra Canonicalization writer target for the XMLParser. Serialises parse events to XML C14N 2.0. The *write* function is used for writing out the resulting data stream as text (not bytes). To write to a file, open it in text mode with encoding "utf-8" and pass its ``.write`` method. Configuration options: - *with_comments*: set to true to include comments - *strip_text*: set to true to strip whitespace before and after text content - *rewrite_prefixes*: set to true to replace namespace prefixes by "n{number}" - *qname_aware_tags*: a set of qname aware tag names in which prefixes should be replaced in text content - *qname_aware_attrs*: a set of qname aware attribute names in which prefixes should be replaced in text content - *exclude_attrs*: a set of attribute names that should not be serialised - *exclude_tags*: a set of tag names that should not be serialised FN) with_comments strip_textrewrite_prefixesqname_aware_tagsqname_aware_attrs exclude_attrs exclude_tagsc2||_g|_||_||_|r t |nd|_|r t |nd|_||_|rt ||_nd|_|rt |j|_ nd|_ dgg|_ g|_ |s6|jjttj!|jjgi|_dg|_d|_d|_d|_d|_y)N)r?rFr)_writer_with_comments _strip_textr}_exclude_attrs _exclude_tags_rewrite_prefixes_qname_aware_tags intersection_find_qname_aware_attrs_declared_ns_stack _ns_stackr[rrr _prefix_map_preserve_space_pending_start _root_seen _root_done_ignored_depth) r3rr%r&r'r(r)r*r+s r&r5zC14NWriterTarget.__init__s  +%4Ac-0t2>S.D!1 %()9%:D "%)D " +./@+A+N+ND (+/D ( <$ #  NN ! !$~';';'="> ? b! %w"r%c#DK||D]}|s|Ed{y7wr=r$)r3ns_stack _reversedrms r&_iter_namespacesz!C14NWriterTarget._iter_namespaces(s$#H-J%%%.%s   c|jdd\}}|j|jD]\}}||k(s d|d|cStd|d|d)NrrrrzPrefix z of QName "" is not declared in scope)splitrAr7r)r3 prefixed_namerrrps r&_resolve_prefix_namez%C14NWriterTarget._resolve_prefix_name-sl$**32 ++DNN;FCF{C54&))<76(+m_D^_``r%c|%|dddk(r|ddjddnd|f\}}n|}t}|j|jD]/\}}||k(r||vr|r|d|n|||fcS|j |1|j ro||j vr|j |}n'dt|j x}|j |<|jdj||f|d|||fS|s d|vr|||fS|j|jD]:\}}||k(s |jdj||f|r|d|n|||fcS|s|||fStd|d ) Nrrrrrrraz Namespace "rC) rr}rAr6addr2r8rCr[r7r)r3rrr( prefixes_seenurs r&_qnamezC14NWriterTarget._qname4s ;38!93CuQRy''Q/"eHCC ..t/F/FGIAvCxF-7,2&3%(S#EE   f %H  ! !d&&&))#.34S9I9I5J4K1LL))#.  # #B ' . .V} =XQse$c3. .r.S= ..t~~>IAvCx''+22C=A,2&3%(S#EE? S= ;se+EFGGr%cT|js|jj|yyr=)r=rr[rs r&rzC14NWriterTarget.dataYs""" JJ  d ##r%rc||j}|jdd=|jr|jds|j}|j<|jdc}|_|r t |r|nd}|j g|||y|r(|jr|jt|yyyNra) rr/r9rgr:_looks_like_prefix_namerr;r-_escape_cdata_c14n)r3 _join_textrr qname_texts r&rzC14NWriterTarget._flush]s$**% JJqM   D$8$8$<::D   C/r%c |j4|r2|jDcic]\}}||jvs||}}}|h|}i}|'|j|x} ||<|j| |jX|rV|j |} | r@| D]:} || } t | s|j| x} || <|j| <nd} nd} |j } t|dDcic] }|| | }}|r.|Dcgc]\}}|rd|znd|f}}}|jng}|rVt|jD]:\}}| || vr||vr |||d}||\}} }|j|r|n| |f<|jd}|jj|r|dk(n|jd|j}|d ||dz|r:|d j|Dcgc]\}}d |d t|d c}}|d||t|||dd|_|j"jgycc}}wcc}wcc}}wcc}}w)Nc&|jddS)Nrr)rD)rs r&rz)C14NWriterTarget._start..s!''#q/r%rzxmlns:xmlnsrz+{http://www.w3.org/XML/1998/namespace}spacepreserverarrrrrrT)r0rrGrIr5rPrLrsortr[ryr9r-r_escape_attrib_c14nrQr;r7)r3r(rrVrSrrrresolved_namesrqattrs attr_namer| parse_qnamer parsed_qnamesrrr attr_qnamespace_behaviourrs r&rzC14NWriterTarget._starts    *u&+kkmTmdaq@S@S7SQTmET  !151J1J:1V VEN:. JJu   ' ' 311%8F!'I!),E.u58<8Q8QRW8XXu 5 5) "( Fkk 4: 153453qKN*53 4 $2#1KC'-F"'3?#1  NN I u{{}-1%!v+!~:M%nQ&78;A-:1-=* Is  *A!FG . ))$QR ##-*3M%Nq%QR S b!CU04 8UsI/I/3I5 I:Jc|jr|xjdzc_y|jr|j|jd|j |dd|j j t|j dk(|_|jj |jj y)Nrrrr) r=rrr-rLr9rrCr<r6r7rs r&rzC14NWriterTarget.ends      1 $   :: KKM bS)!,-Q/0   "d223q8 ##% r%c<|jsy|jry|jr|jdn(|jr|j r|j |jdt|d|js|jdyy)Nrz)r.r=r<r-r;rrrQrs r&rzC14NWriterTarget.commentsw""      ?? KK  __ KKM d-d34C89 KK r%c8|jry|jr|jdn(|jr|jr|j |j|rd|dt |dnd|d|js|jdyy)Nrz)r=r<r-r;rrrQ)r3rrs r&rzC14NWriterTarget.pis     ?? KK  __ KKM :>b,T232 6bPRO U KK r%r=)r r!r"r#r5reversedrArGrLrrrrrrrrrr$r%r&rrsj, %"&$#$# J4<& a#HJ$!# 210"C"J   r%rc d|vr|jdd}d|vr|jdd}d|vr|jdd}d|vr|jdd}|S#ttf$rt|YywxYw) NrCrDrrErrFrL rGrs r&rQrQs) $;<<W-D $;<<V,D $;<<V,D 4<<<g.D ~ &)"4()sAAA98A9cP d|vr|jdd}d|vr|jdd}d|vr|jdd}d|vr|jdd}d |vr|jd d }d |vr|jd d }|S#ttf$rt|YywxYw) NrCrDrrErrKrMz rz rLrirGrs r&r\r\s) $;<<W-D $;<<V,D $;<<X.D 4<<<g.D 4<<<g.D 4<<<g.D ~ &)"4()sBBB%$B%)r)_set_factoriesr=r)z r)@r#__all__rrbr8rIrrcollections.abcrrrrrr r rrrrr rrcontextmanagerrrrr2r0rrrrrrrr1rrrVrrrr r rrrrrrrrcompileUNICODEr9rPrrQr\rd _elementtreerkrr$r%r&rrs!P (       # ^^B $&$  +"+"`\/\/B /+/+b;z0(d 0(d    !*-2$*38(.(,16(, %3! ) )8 )!T"&0b''" !%&* &/l 5p77t",  $vvth?h?Z7tt7<%"**\2::>DDD)&). 3K+712  s E,,E43E4PK!.__pycache__/cElementTree.cpython-312.opt-2.pycnu[ ֦iRddly))*N)xml.etree.ElementTree//usr/lib64/python3.12/xml/etree/cElementTree.pyrs $rPK!99-__pycache__/ElementPath.cpython-312.opt-1.pycnu[ ֦i6ddlZejdZddZdZdZdZdZdZd Z d Z d Z d Z eee e e e d Z iZGddZddZddZddZddZy)Nz`('[^']*'|\"[^\"]*\"|::|//?|\.\.|\(\)|!=|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@!=\s]+)|\s+c#jK|r|jdnd}d}tj|D]d}|\}}|rR|ddk7rJd|vr.|jdd\}} |st|d||d|fn|r|s |d|d|fn|d}\||d k(}fy#t$rt d|zdwxYww) NFr{:}z!prefix %r not found in prefix map@)getxpath_tokenizer_refindallsplitKeyError SyntaxError) pattern namespacesdefault_namespaceparsing_attributetokenttypetagprefixuris ./usr/lib64/python3.12/xml/etree/ElementPath.pyxpath_tokenizerrJs.8 r*d#++G4 s 3q6S=cz!iiQ/ ^%&Z-?!EEE#+<):C@@@ % K % %5 ^%&IF&RSY]]^sAB3B2%B3B00B3c|j}|4ix|_}|jjD]}|D]}|||< |SN) parent_maprootiter)contextrpes rget_parent_mapr#bsR##J*,,Z""$A ! 1 % c&|dddk(xs|dddk(S)N{*}}*rs r_is_wildcard_tagr,ls# r7e  /s23x4//r$c8ttcdk(rfd}|Sdk(rfd}|Sdddk(r+ddtt dddfd}|Sd dd k(r$dd tdtfd }|St d )Nz{*}*c3LK|D]}|js|ywrr+)r resultelem _isinstance_strs rselectz_prepare_tag..selectvs$txx.Js$$z{}*c3bK|D]%}|j}|s|ddk7s"|'yw)Nrrr+)r r/r0el_tagr1r2s rr3z_prepare_tag..select|s4vt,c1AJ ///r&r'c3lK|D]*}|j}|k(s|s|k(s'|,ywrr+) r r/r0r5r1r2no_nssuffixrs rr3z_prepare_tag..selects;S=K$=&-SYBYJs 444r(r)c3bK|D]%}|j}|s|k(s"|'ywrr+)r r/r0r5r1r2nsns_onlys rr3z_prepare_tag..selects4vt,B1FJr6zinternal parser error, got ) isinstancestrslicelen RuntimeError)rr3r1r2r9r=r>r:s` @@@@@@r _prepare_tagrDps"CK f} @ M9  4 M+ RaE QRs6{lD)!"g   M RST  "Xc"g&  M8>??r$cr|dtrtfd}|Sdddk(rddfd}|S)Nrc(d}|||S)Nc32K|D] }|Ed{y7wrr*)r/r0s r select_childz3prepare_child..select..select_childs"D#OO## r*r r/rH select_tags rr3zprepare_child..selects $g|F';< .selects+Auu|s' ')r,rDnextrr3rKrs @@r prepare_childrQsP (C!#&  = M r7d?ab'C Mr$c d}|S)Nc32K|D] }|Ed{y7wrr*)r r/r0s rr3zprepare_star..selectsDOO rIr*rPrr3s r prepare_starrUs Mr$c d}|S)Nc3$K|Ed{y7wrr*)r r/s rr3zprepare_self..selectss r*rTs r prepare_selfrXs  Mr$c |}|ddk(rdn|ds|dn tdtrtfd}|Sdddk(rddfd}|S#t$rYywxYw) Nr*rzinvalid descendantc(d}|||S)Nc3VK|D] }|jD] }||us| "ywrr)r/r0r"s rrHz8prepare_descendant..select..select_childs,"D!YY[D="#G)#s) )r*rJs rr3z"prepare_descendant..selects $ g|F';< .selects/3A}(s+ +) StopIterationrr,rDrOs @@rprepare_descendantr`s Qx3 1XAh.//!#&  = M r7d?ab'C M5 sA A)(A)c d}|S)Nc3dKt|}i}|D]}||vs||}||vsd||<|ywr)r#)r r/r result_mapr0parents rr3zprepare_parent..selectsH#G,  Dz!#D)+)-Jv& L s 0 0 0r*rTs rprepare_parentres ! Mr$c g}g} |}|ddk(rnL|dk(r|dr|ddddvr d|dddf}|j|dxsd|j|d]d j|}|d k(r |dfd }|S|d k(s|d k(r|d|d  fd} fd}d|vr|S|S|dk(r%tjd|ds |dfd}|S|dk(s(|dk(s#|dk(s|dk(rDtjd|ds+|d|d r  fd} fd}n fd} fd}d|vr|S|S|dk(s |dk(s|dk(ri|dk(r!t |ddz dkrGt d|ddk7r t d|dk(r" t |d dz d"kDr t d#dfd$}|St d%#t$rYywxYw#t$r t d!wxYw)&Nrr])rrz'"'r;-rz@-c3HK|D]}|j|ywrr )r r/r0keys rr3z!prepare_predicate..selects$88C=,J""z@-='z@-!='c3NK|D]}|jk(s|ywrrk)r r/r0rlvalues rr3z!prepare_predicate..selects&88C=E)Js%%c3XK|D] }|jx}|k7s|"ywrrk)r r/r0 attr_valuerlros rselect_negatedz)prepare_predicate..select_negateds0"&((3-/J<uATJs ***z!=z\-?\d+$c3HK|D]}|j|ywr)find)r r/r0rs rr3z!prepare_predicate..selects$99S>-Jrmz.='z.!='z-='z-!='c3K|D]@}|jD]*}dj|jk(s&|@BywNr)r joinitertextr r/r0r"rros rr3z!prepare_predicate..selectsC"D!\\#.771::<0E9"&J!/# .select_negated"sC"D!]]3/771::<0E9"&J!0#rzc3jK|D])}dj|jk(s&|+ywrvrwrxr r/r0ros rr3z!prepare_predicate..select)-"Dwwt}}/58" #(33c3jK|D])}dj|jk7s&|+ywrvr~rs rrrz)prepare_predicate..select_negated-rrz-()z-()-zXPath position >= 1 expectedlastzunsupported functionr7zunsupported expressionr(z)XPath offset from last() must be negativec3Kt|}|D]7} ||}t|j|j}||ur|9y#tt f$rYLwxYwwr)r#listr r IndexErrorr)r r/rr0rdelemsindexs rr3z!prepare_predicate..selectEsk'0J'-F !9:EU|t+" #H-s(A!4A  A! AA!AA!zinvalid predicate)r_appendrwrematchintr ValueError) rPr signature predicater3rrrrlrros @@@@rprepare_predicaters|II  FE 8s?  H   8a! -q!B'EqS)q"  "IDl  Fi72l"   "&!2~>>CYq\ Bl  EY&0 % 9#6HHZ16l"   "  " # #"&!2~>>C9-f1D   ! %)Eqy!"@AA|v%!"899F"@ ! -1E2:%&QRR  ) **M   h"@%&>??@sF6G6 GGG)rrZ.z..z//[ceZdZdZdZy)_SelectorContextNc||_yr)r)selfrs r__init__z_SelectorContext.__init__`s  r$)__name__ __module__ __qualname__rrr*r$rrr^s Jr$rc|dddk(r|dz}|f}|r%|tt|jz } t|}|g}t|}|D] } | ||} |S#t$rt tdkDrtj |dddk(r tdtt||j} |}n#t$rYYywxYwg} |jt|d||n#t$r tddwxYw |}|ddk(r|}n#t$rYnwxYwd|t|<Y wxYw) Nr;/rZdrz#cannot use absolute path on elementrz invalid path)tuplesorteditems_cacherrBclearrrr__next__r_ropsr) r0pathr cache_keyselectorrPrr/r r3s rr|r|hsv BCyCczIU6*"2"2"4566 %)$2VFt$G( M9 % v;  LLN 8s?CD DOD*56?? FE    <E!H dE :;  <!.1t; < 8s? FE   %y-%sr A""A!EC  E CECE !DEDED32E3 D?<E>D?? EEc0tt|||dSr)rPr|r0rrs rrtrts tZ0$ 77r$c.tt|||Sr)rr|rs rr r s tZ0 11r$c tt|||}|jy|jS#t$r|cYSwxYwrv)rPr|textr_)r0rdefaultrs rfindtextrsEHT445 99 yy s"1 1 ??r)NN)rcompiler rr#r,rDrQrUrXr`rerrrrr|rtr rr*r$rrsv RZZ   -00&R&  > n+b        'X8 2 r$PK!.__pycache__/cElementTree.cpython-312.opt-1.pycnu[ ֦iRddly))*N)xml.etree.ElementTree//usr/lib64/python3.12/xml/etree/cElementTree.pyrs $rPK!99'__pycache__/ElementPath.cpython-312.pycnu[ ֦i6ddlZejdZddZdZdZdZdZdZd Z d Z d Z d Z eee e e e d Z iZGddZddZddZddZddZy)Nz`('[^']*'|\"[^\"]*\"|::|//?|\.\.|\(\)|!=|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@!=\s]+)|\s+c#jK|r|jdnd}d}tj|D]d}|\}}|rR|ddk7rJd|vr.|jdd\}} |st|d||d|fn|r|s |d|d|fn|d}\||d k(}fy#t$rt d|zdwxYww) NFr{:}z!prefix %r not found in prefix map@)getxpath_tokenizer_refindallsplitKeyError SyntaxError) pattern namespacesdefault_namespaceparsing_attributetokenttypetagprefixuris ./usr/lib64/python3.12/xml/etree/ElementPath.pyxpath_tokenizerrJs.8 r*d#++G4 s 3q6S=cz!iiQ/ ^%&Z-?!EEE#+<):C@@@ % K % %5 ^%&IF&RSY]]^sAB3B2%B3B00B3c|j}|4ix|_}|jjD]}|D]}|||< |SN) parent_maprootiter)contextrpes rget_parent_mapr#bsR##J*,,Z""$A ! 1 % c&|dddk(xs|dddk(S)N{*}}*rs r_is_wildcard_tagr,ls# r7e  /s23x4//r$c8ttcdk(rfd}|Sdk(rfd}|Sdddk(r+ddtt dddfd}|Sd dd k(r$dd tdtfd }|St d )Nz{*}*c3LK|D]}|js|ywrr+)r resultelem _isinstance_strs rselectz_prepare_tag..selectvs$txx.Js$$z{}*c3bK|D]%}|j}|s|ddk7s"|'yw)Nrrr+)r r/r0el_tagr1r2s rr3z_prepare_tag..select|s4vt,c1AJ ///r&r'c3lK|D]*}|j}|k(s|s|k(s'|,ywrr+) r r/r0r5r1r2no_nssuffixrs rr3z_prepare_tag..selects;S=K$=&-SYBYJs 444r(r)c3bK|D]%}|j}|s|k(s"|'ywrr+)r r/r0r5r1r2nsns_onlys rr3z_prepare_tag..selects4vt,B1FJr6zinternal parser error, got ) isinstancestrslicelen RuntimeError)rr3r1r2r9r=r>r:s` @@@@@@r _prepare_tagrDps"CK f} @ M9  4 M+ RaE QRs6{lD)!"g   M RST  "Xc"g&  M8>??r$cr|dtrtfd}|Sdddk(rddfd}|S)Nrc(d}|||S)Nc32K|D] }|Ed{y7wrr*)r/r0s r select_childz3prepare_child..select..select_childs"D#OO## r*r r/rH select_tags rr3zprepare_child..selects $g|F';< .selects+Auu|s' ')r,rDnextrr3rKrs @@r prepare_childrQsP (C!#&  = M r7d?ab'C Mr$c d}|S)Nc32K|D] }|Ed{y7wrr*)r r/r0s rr3zprepare_star..selectsDOO rIr*rPrr3s r prepare_starrUs Mr$c d}|S)Nc3$K|Ed{y7wrr*)r r/s rr3zprepare_self..selectss r*rTs r prepare_selfrXs  Mr$c |}|ddk(rdn|ds|dn tdtrtfd}|Sdddk(rddfd}|S#t$rYywxYw) Nr*rzinvalid descendantc(d}|||S)Nc3VK|D] }|jD] }||us| "ywrr)r/r0r"s rrHz8prepare_descendant..select..select_childs,"D!YY[D="#G)#s) )r*rJs rr3z"prepare_descendant..selects $ g|F';< .selects/3A}(s+ +) StopIterationrr,rDrOs @@rprepare_descendantr`s Qx3 1XAh.//!#&  = M r7d?ab'C M5 sA A)(A)c d}|S)Nc3dKt|}i}|D]}||vs||}||vsd||<|ywr)r#)r r/r result_mapr0parents rr3zprepare_parent..selectsH#G,  Dz!#D)+)-Jv& L s 0 0 0r*rTs rprepare_parentres ! Mr$c g}g} |}|ddk(rnL|dk(r|dr|ddddvr d|dddf}|j|dxsd|j|d]d j|}|d k(r |dfd }|S|d k(s|d k(r|d|d  fd} fd}d|vr|S|S|dk(r%tjd|ds |dfd}|S|dk(s(|dk(s#|dk(s|dk(rDtjd|ds+|d|d r  fd} fd}n fd} fd}d|vr|S|S|dk(s |dk(s|dk(ri|dk(r!t |ddz dkrGt d|ddk7r t d|dk(r" t |d dz d"kDr t d#dfd$}|St d%#t$rYywxYw#t$r t d!wxYw)&Nrr])rrz'"'r;-rz@-c3HK|D]}|j|ywrr )r r/r0keys rr3z!prepare_predicate..selects$88C=,J""z@-='z@-!='c3NK|D]}|jk(s|ywrrk)r r/r0rlvalues rr3z!prepare_predicate..selects&88C=E)Js%%c3XK|D] }|jx}|k7s|"ywrrk)r r/r0 attr_valuerlros rselect_negatedz)prepare_predicate..select_negateds0"&((3-/J<uATJs ***z!=z\-?\d+$c3HK|D]}|j|ywr)find)r r/r0rs rr3z!prepare_predicate..selects$99S>-Jrmz.='z.!='z-='z-!='c3K|D]@}|jD]*}dj|jk(s&|@BywNr)r joinitertextr r/r0r"rros rr3z!prepare_predicate..selectsC"D!\\#.771::<0E9"&J!/# .select_negated"sC"D!]]3/771::<0E9"&J!0#rzc3jK|D])}dj|jk(s&|+ywrvrwrxr r/r0ros rr3z!prepare_predicate..select)-"Dwwt}}/58" #(33c3jK|D])}dj|jk7s&|+ywrvr~rs rrrz)prepare_predicate..select_negated-rrz-()z-()-zXPath position >= 1 expectedlastzunsupported functionr7zunsupported expressionr(z)XPath offset from last() must be negativec3Kt|}|D]7} ||}t|j|j}||ur|9y#tt f$rYLwxYwwr)r#listr r IndexErrorr)r r/rr0rdelemsindexs rr3z!prepare_predicate..selectEsk'0J'-F !9:EU|t+" #H-s(A!4A  A! AA!AA!zinvalid predicate)r_appendrwrematchintr ValueError) rPr signature predicater3rrrrlrros @@@@rprepare_predicaters|II  FE 8s?  H   8a! -q!B'EqS)q"  "IDl  Fi72l"   "&!2~>>CYq\ Bl  EY&0 % 9#6HHZ16l"   "  " # #"&!2~>>C9-f1D   ! %)Eqy!"@AA|v%!"899F"@ ! -1E2:%&QRR  ) **M   h"@%&>??@sF6G6 GGG)rrZ.z..z//[ceZdZdZdZy)_SelectorContextNc||_yr)r)selfrs r__init__z_SelectorContext.__init__`s  r$)__name__ __module__ __qualname__rrr*r$rrr^s Jr$rc|dddk(r|dz}|f}|r%|tt|jz } t|}|g}t|}|D] } | ||} |S#t$rt tdkDrtj |dddk(r tdtt||j} |}n#t$rYYywxYwg} |jt|d||n#t$r tddwxYw |}|ddk(r|}n#t$rYnwxYwd|t|<Y wxYw) Nr;/rZdrz#cannot use absolute path on elementrz invalid path)tuplesorteditems_cacherrBclearrrr__next__r_ropsr) r0pathr cache_keyselectorrPrr/r r3s rr|r|hsv BCyCczIU6*"2"2"4566 %)$2VFt$G( M9 % v;  LLN 8s?CD DOD*56?? FE    <E!H dE :;  <!.1t; < 8s? FE   %y-%sr A""A!EC  E CECE !DEDED32E3 D?<E>D?? EEc0tt|||dSr)rPr|r0rrs rrtrts tZ0$ 77r$c.tt|||Sr)rr|rs rr r s tZ0 11r$c tt|||}|jy|jS#t$r|cYSwxYwrv)rPr|textr_)r0rdefaultrs rfindtextrsEHT445 99 yy s"1 1 ??r)NN)rcompiler rr#r,rDrQrUrXr`rerrrrr|rtr rr*r$rrsv RZZ   -00&R&  > n+b        'X8 2 r$PK!7 $__pycache__/__init__.cpython-312.pycnu[ ֦iEy)Nr+/usr/lib64/python3.12/xml/etree/__init__.pyrsrPK!b>>-__pycache__/ElementTree.cpython-312.opt-1.pycnu[ ֦i!!dZgdZdZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl m Z Gdde Zd ZGd d Zifd ZdCd ZdCdZeZGddZGddZe j.dZdCdZdZhdZdZdZeeedZdZdddddd d!d"Z e e_ d#Z!d$Z"d%Z#d&Z$dDddd'd(d)Z%Gd*d+ejLZ'dDddd'd(d,Z(d-Z)dEd.Z*dCd/Z+dDd0Z,Gd1d2Z-dCd3Z.dCd4Z/e.Z0dCd5Z1Gd6d7Z2Gd8d9Z3dCddd:d;Z4ejjdZ9d?Z:d@Z; eZZ>e>eey#e?$rYywxYw)FaLightweight XML support for Python. XML is an inherently hierarchical data format, and the most natural way to represent it is with a tree. This module has two classes for this purpose: 1. ElementTree represents the whole XML document as a tree and 2. Element represents a single node in this tree. Interactions with the whole document (reading and writing to/from files) are usually done on the ElementTree level. Interactions with a single XML element and its sub-elements are done on the Element level. Element is a flexible container object designed to store hierarchical data structures in memory. It can be described as a cross between a list and a dictionary. Each Element has a number of properties associated with it: 'tag' - a string containing the element's name. 'attributes' - a Python dictionary storing the element's attributes. 'text' - a string containing the element's text content. 'tail' - an optional string containing text after the element's end tag. And a number of child elements stored in a Python sequence. To create an element instance, use the Element constructor, or the SubElement factory function. You can also use the ElementTree class to wrap an element structure and convert it to and from XML. )CommentdumpElement ElementTree fromstringfromstringlistindent iselement iterparseparse ParseErrorPIProcessingInstructionQName SubElementtostring tostringlist TreeBuilderVERSIONXMLXMLID XMLParser XMLPullParserregister_namespace canonicalizeC14NWriterTargetz1.3.0N) ElementPathceZdZdZy)r zAn error when parsing an XML document. In addition to its exception value, a ParseError contains two extra attributes: 'code' - the specific exception code 'position' - the line and column of the error N)__name__ __module__ __qualname____doc__./usr/lib64/python3.12/xml/etree/ElementTree.pyr r ks  r%r ct|dS)z2Return True if *element* appears to be an Element.tag)hasattr)elements r&r r ys 7E ""r%ceZdZdZdZ dZ dZ dZ ifdZdZ dZ dZ dZ dZ d Zd Zd Zd Zd ZdZdZdZddZddZddZddZdZddZdZdZdZddZdZ y)rahAn XML element. This class is the reference implementation of the Element interface. An element's length is its number of subelements. That means if you want to check if an element is truly empty, you should check BOTH its length AND its text attribute. The element tag, attribute names, and attribute values can be either bytes or strings. *tag* is the element name. *attrib* is an optional dictionary containing element attributes. *extra* are additional element attributes given as keyword arguments. Example form: text...tail Nc t|ts"td|jj||_i|||_g|_y)Nzattrib must be dict, not ) isinstancedict TypeError __class__r r(attrib _children)selfr(r1extras r&__init__zElement.__init__sL&$'  )),- -))5) r%c`d|jj|jt|fzS)Nz<%s %r at %#x>)r0r r(idr3s r&__repr__zElement.__repr__s&4>>#:#:DHHbh"OOOr%c&|j||S)zCreate a new element with the same type. *tag* is a string containing the element name. *attrib* is a dictionary containing the element attributes. Do not call this method, use the SubElement factory function instead. )r0)r3r(r1s r& makeelementzElement.makeelements~~c6**r%c|j|j|j}|j|_|j|_||dd|SN)r;r(r1texttail)r3elems r&__copy__zElement.__copy__s@$++6II II Q r%c,t|jSr=)lenr2r8s r&__len__zElement.__len__s4>>""r%cjtjdtdt|jdk7S)NzTesting an element's truth value will always return True in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. stacklevelr)warningswarnDeprecationWarningrCr2r8s r&__bool__zElement.__bool__s1  K 1   4>>"a''r%c |j|Sr=r2r3indexs r& __getitem__zElement.__getitem__s~~e$$r%ct|tr|D]}|j|n|j|||j|<yr=)r-slice_assert_is_elementr2)r3rPr*elts r& __setitem__zElement.__setitem__sB eU #'',  # #G , 'ur%c|j|=yr=rNrOs r& __delitem__zElement.__delitem__s NN5 !r%c\|j||jj|y)aAdd *subelement* to the end of this element. The new element will appear in document order after the last existing subelement (or directly after the text, if it's the first subelement), but before the end tag for this element. NrTr2appendr3 subelements r&r[zElement.appends$  + j)r%cj|D].}|j||jj|0y)zkAppend subelements from a sequence. *elements* is a sequence with zero or more elements. NrZ)r3elementsr*s r&extendzElement.extends.  G  # #G , NN ! !' * r%c^|j||jj||y)z(Insert *subelement* at position *index*.N)rTr2insert)r3rPr]s r&rbzElement.inserts$  + eZ0r%cft|ts!tdt|jzy)Nzexpected an Element, not %s)r- _Element_Pyr/typer )r3es r&rTzElement._assert_is_elements.![)9DGr?r8s r&rwz Element.clear?s)  $$ DIr%c:|jj||S)agGet element attribute. Equivalent to attrib.get, but some implementations may handle this a bit more efficiently. *key* is what attribute to look for, and *default* is what to return if the attribute was not found. Returns a string containing the attribute value, or the default if attribute was not found. )r1get)r3keyrqs r&ryz Element.getJs{{sG,,r%c"||j|<y)zSet element attribute. Equivalent to attrib[key] = value, but some implementations may handle this a bit more efficiently. *key* is what attribute to set, and *value* is the attribute value to set it to. N)r1)r3rzvalues r&setz Element.setWs! Cr%c6|jjS)zGet list of attribute names. Names are returned in an arbitrary order, just like an ordinary Python dict. Equivalent to attrib.keys() )r1keysr8s r&rz Element.keysas{{!!r%c6|jjS)zGet element attributes as a sequence. The attributes are returned in arbitrary order. Equivalent to attrib.items(). Return a list of (name, value) tuples. )r1itemsr8s r&rz Element.itemsjs{{  ""r%c#K|dk(rd}||j|k(r||jD]}|j|Ed{y7w)aCreate tree iterator. The iterator loops over the element and all subelements in document order, returning all elements with a matching tag. If the tree structure is modified during iteration, new or removed elements may or may not be included. To get a stable set, use the list() function on the iterator, and loop over the resulting list. *tag* is what tags to look for (default is to return all elements) Return an iterator containing all the matching elements. *N)r(r2iter)r3r(rfs r&rz Element.iterusJ #:C ;$((c/JAvvc{ " " "sAA A A c#K|j}t|ts|y|j}|r||D]-}|j Ed{|j }|s*|/y7w)zCreate text iterator. The iterator loops over the element and all subelements in document order, returning all inner text. N)r(r-strr>itertextr?)r3r(trfs r&rzElement.itertexts`hh#s#  II GAzz| # #A  #sA A) A' A) A)r=NN)!r r!r"r#r(r1r>r?r5r9r;rArDrLrQrVrXr[r`rbrTrhrjrorsrurwryr}rrrrr$r%r&rr~s( C F1 D D$&P +#(%(" *+1 N * 8 E ; < % -!" ##,r%rc Xi||}|j||}|j||S)aSubelement factory which creates an element instance, and appends it to an existing parent. The element tag, attribute names, and attribute values can be either bytes or Unicode strings. *parent* is the parent element, *tag* is the subelements name, *attrib* is an optional directory containing element attributes, *extra* are additional attributes given as keyword arguments. )r;r[)parentr(r1r4r*s r&rrs6! % F  f-G MM' Nr%c2tt}||_|S)zComment element factory. This function creates a special element which the standard serializer serializes as an XML comment. *text* is a string containing the comment string. )rrr>)r>r*s r&rrsgGGL Nr%cdtt}||_|r|jdz|z|_|S)a*Processing Instruction element factory. This function creates a special element which the standard serializer serializes as an XML comment. *target* is a string containing the processing instruction, *text* is a string containing the processing instruction contents, if any.  )rrr>)targetr>r*s r&rrs3+,GGL ||c)D0 Nr%cHeZdZdZd dZdZdZdZdZdZ d Z d Z d Z y) raQualified name wrapper. This class can be used to wrap a QName attribute value in order to get proper namespace handing on output. *text_or_uri* is a string containing the QName value either in the form {uri}local, or if the tag argument is given, the URI part of a QName. *tag* is an optional argument which if given, will make the first argument (text_or_uri) be interpreted as a URI, and this argument (tag) be interpreted as a local name. Nc&|rd|d|}||_y)N{}r>)r3 text_or_urir(s r&r5zQName.__init__s &137K r%c|jSr=rr8s r&__str__z QName.__str__s yyr%cPd|jjd|jdS)N)r0r r>r8s r&r9zQName.__repr__s NN33TYY??r%c,t|jSr=)hashr>r8s r&__hash__zQName.__hash__sDIIr%crt|tr|j|jkS|j|kSr=r-rr>r3others r&__le__z QName.__le__. eU #99 * *yyE!!r%crt|tr|j|jkS|j|kSr=rrs r&__lt__z QName.__lt__. eU #99uzz) )yy5  r%crt|tr|j|jk\S|j|k\Sr=rrs r&__ge__z QName.__ge__rr%crt|tr|j|jkDS|j|kDSr=rrs r&__gt__z QName.__gt__rr%crt|tr|j|jk(S|j|k(Sr=rrs r&__eq__z QName.__eq__rr%r=) r r!r"r#r5rr9rrrrrrr$r%r&rrs5  @"!"!"r%rcpeZdZdZddZdZdZddZddZddZ dd Z dd Z dd Z dd d dZ dZy)ra%An XML element hierarchy. This class also provides support for serialization to and from standard XML. *element* is an optional root element node, *file* is an optional file handle or file name of an XML file whose contents will be used to initialize the tree with. Nc:||_|r|j|yyr=)_rootr )r3r*files r&r5zElementTree.__init__ s  JJt  r%c|jS)z!Return root element of this tree.rr8s r&getrootzElementTree.getroots zzr%c||_y)zReplace root element of this tree. This will discard the current contents of the tree and replace it with the given element. Use with care! Nr)r3r*s r&_setrootzElementTree._setroots  r%cd}t|dst|d}d} |Kt}t|dr5|j||_|j|r|j SS|j dx}r%|j||j dx}r%|j |_|j|r|j SS#|r|j wwxYw)a=Load external XML document into element tree. *source* is a file name or file object, *parser* is an optional parser instance that defaults to XMLParser. ParseError is raised if the parser fails to parse the document. Returns the root element of the given source document. FreadrbT _parse_wholei)r)openrrrcloserfeed)r3sourceparser close_sourcedatas r&r zElementTree.parse!s vv&&$'FL ~"6>2 "(!4!4V! r>r) _serialize ValueError _get_writerlower_serialize_textr _namespaces) r3file_or_filenameencodingxml_declarationdefault_namespacemethodrwritedeclared_encodingqnamesrm serializes r&rzElementTree.writes:F : %069: :"% )8 48R@QO$,^^%2&,,.6KK%()tzz2%0=N%O" &v. %VZ/CE5 4 4s BCCc(|j|dS)Nr)r)r)r3rs r& write_c14nzElementTree.write_c14nszz$vz..r%rr=)NNNN)r r!r"r#r5rrr rrjrorsrurrr$r%r&rrsZ   D $1,>,4,5." $ 3E $( 3Ej/r%rc#~K |j}|jdk(r|t|ddxsdfytj5}t |t jr|}nt |t jr1t j|}|j|jnFt j}d|_ ||_ |j|_ |j|_t j ||dd}|j|j|j|fdddy#t$rYXwxYw#1swYyxYw#t$rM|jdk(rd}t#|d|d 5}|j|fdddYy#1swYYyxYwwxYww) NrrrcyNTr$r$r%r&z_get_writer..sDr%xmlcharrefreplace )rerrorsnewlinew)rr)rrgetattr contextlib ExitStackr-ioBufferedIOBase RawIOBaseBufferedWritercallbackdetachwritableseekabletellAttributeError TextIOWrapperr)rrrstackrs r&rrs-+ && >> y (!1:tDOO O%%'5.0A0AB+D 0",,?,,-=>DNN4;;/,,.D$0DM!&DJ)9(A(A $4$9$9 ''19/B046 t{{+jj(**9('&*'(' ' >> y (H "C(,.15**h& &... 'sF= E$=F= B E"E .add_qname s .RayC 9++C3S#,>+//4F~!'#j/!9*0 3/5s$;F5M$'F5M$$3!&u  . &u - .sA.B 2B 8B B"!B") rr(r-rr>rrr rr) r@rrr(rzr|r>rmrs ` @@r&rrs(D\FJ(* $%.8 hh c5 !xxv%#((# S !& # _G!32 &s +**,JC#u%hh& #%'EJJf,D%**% 'yy dE "tyy'> dii '( : r%c |j}|j}|tur |d|znp|tur |d|zn[||}|,|r|t ||D]}t |||d|n(|d|zt |j} | s|r|rCt|jdD]$\} } | rd| z} |d| d t| d &| D]^\} } t| tr | j} t| tr|| j} n t| } |d || d | d `|s t|s|sA|d |r|t ||D]}t |||d||d |zd zn|d|jr|t |jyy)N rrc |dSNrr$xs r&rz _serialize_xml..hQqTr%rzr xmlns=""rr)r(r>rr _escape_cdata_serialize_xmllistrsorted_escape_attribr-rrCr?) rr@rrmrkwargsr(r>rfrvks r&rrRs ((C 99D g~ kD ! % % hoSk ;mD)*ua4HJ #) &E  &z'7'7'9+9!;1 #aA*1- !;"DAq!!U+FF!!U+"166N*1-&)Q78"s4y(<c --.A"5!VT8LNdSj3&'e  yy mDII&'r%>brhrcolimgwbrareabaselinkmetaembedframeinputparamtrackrisindexbasefontc |j}|j}|tur|dt|zn|tur|dt|znj||}|*|r|t||D]}t |||dn9|d|zt |j}|s|r|rCt|jdD]$\} } | rd| z} |d| dt| d &|D]^\} } t| tr | j} t| tr|| j} n t| } |d || d| d `|d |j} |r$| d k(s| d k(r ||n|t||D]}t |||d| tvr|d|zd z|jr|t|jyy)Nrr rc |dSr r$r s r&rz!_serialize_html..rr%rrrrrrrscriptstyler)r(r>rrr_serialize_htmlrrrrr-r_escape_attrib_htmlr HTML_EMPTYr?) rr@rrmrr(r>rfrrrltags r&r0r0s ((C 99D g~ kM$//0 % % ht,,-Sk ;mD)*q&$7 #) &E  &z'7'7'9+9!;1 #aA*1- !;"DAq!!U+FF!!U+"166N/2&)Q78" #J99;D8#tw$K--.q&$7:%dSj3&' yy mDII&'r%c||jD] }|| |jr||jyyr=)rr?)rr@parts r&rrs1  d   yy diir%)rhtmlr>ctjd|r tdttj D]\}}||k(s||k(st|=|t|<y)atRegister a namespace prefix. The registry is global, and any existing mapping for either the given prefix or the namespace URI will be removed. *prefix* is the namespace prefix, *uri* is a namespace uri. Tags and attributes in this namespace will be serialized with prefix if possible. ValueError is raised if prefix is reserved or is invalid. zns\d+$z'Prefix format reserved for internal useN)rematchrrrr)rrrrs r&rrs[ xx 6"BCC^))+,1 8qF{q!-!N3r%rr6rdfwsdlxsxsidc)$http://www.w3.org/XML/1998/namespacezhttp://www.w3.org/1999/xhtmlz+http://www.w3.org/1999/02/22-rdf-syntax-ns#z http://schemas.xmlsoap.org/wsdl/z http://www.w3.org/2001/XMLSchemaz)http://www.w3.org/2001/XMLSchema-instancez http://purl.org/dc/elements/1.1/cLtd|dt|jd)Nzcannot serialize z (type ))r/rer rs r&rrs! +/d1D1DE  r%c d|vr|jdd}d|vr|jdd}d|vr|jdd}|S#ttf$rt|YywxYw)N&&r<r>replacer/rrrs r&rrso ) $;<<W-D $;<<V,D $;<<V,D ~ &)"4()AAA#"A#c| d|vr|jdd}d|vr|jdd}d|vr|jdd}d|vr|jdd}d |vr|jd d }d |vr|jd d }d |vr|jd d}|S#ttf$rt|YywxYw)NrCrDrrErrFr" z rz  z rGrs r&rrs) $;<<W-D $;<<V,D $;<<V,D 4<<<h/D 4<<<g.D 4<<<g.D 4<<<g.D ~ &)"4()sBBB;:B;c d|vr|jdd}d|vr|jdd}d|vr|jdd}|S#ttf$rt|YywxYw)NrCrDrrFrrKrGrs r&r1r1sm ) $;<<W-D $;<<V,D 4<<<h/D ~ &)"4()rIT)rrrc|dk(rtjntj}t|j |||||||j S)a Generate string representation of XML element. All subelements are included. If encoding is "unicode", a string is returned. Otherwise a bytestring is returned. *element* is an Element instance, *encoding* is an optional output encoding defaulting to US-ASCII, *method* is an optional output which can be one of "xml" (default), "html", "text" or "c14n", *default_namespace* sets the default XML namespace (for "xmlns"). Returns an (optionally) encoded string containing the XML data. rrrrr)rStringIOBytesIOrrgetvalue)r*rrrrrstreams r&rr+sV ')3R[[]Fvx/>1B&,4H J ?? r%c.eZdZdZdZdZdZdZdZy)_ListDataStreamz7An auxiliary stream accumulating into a list reference.c||_yr=)lst)r3rXs r&r5z_ListDataStream.__init__Es r%cyrr$r8s r&rz_ListDataStream.writableHr%cyrr$r8s r&rz_ListDataStream.seekableKrZr%c:|jj|yr=)rXr[)r3bs r&rz_ListDataStream.writeNs r%c,t|jSr=)rCrXr8s r&rz_ListDataStream.tellQs488}r%N) r r!r"r#r5rrrrr$r%r&rVrVCsAr%rVc`g}t|}t|j|||||||S)NrP)rVrr)r*rrrrrrXrTs r&rrTsC C S !Fvx/>1B&,4H J Jr%ct|ts t|}|jtjd|j j }|r|ddk7r tjjdyy)a#Write element tree or element structure to sys.stdout. This function should be used for debugging only. *elem* is either an ElementTree, or a single Element. The exact output format is implementation dependent. In this version, it's written as an ordinary XML file. r)rrN)r-rrsysstdoutrr?)r@r?s r&rrasb dK (4 JJszzIJ. <<>  D 48t# $r%ct|tr|j}|dkrtd|t |syd|zzgfd|dy)a&Indent an XML document by inserting newlines and indentation space after elements. *tree* is the ElementTree or Element to modify. The (root) element itself will not be changed, but the tail text of all elements in its subtree will be adapted. *space* is the whitespace to insert for each indentation level, two space characters by default. *level* is the initial indentation level. Setting this to a higher value than 0 can be used for indenting subtrees that are more deeply nested inside of a document. rz,Initial indentation level must be >= 0, got Nrc|dz} |}|jr|jjs||_|D]D}t |r |||j r|j jr>||_Fj js ||_yy#t$r|z}j|YwxYwr ) IndexErrorr[r>striprCr?)r@level child_levelchild_indentationchild_indent_children indentationsspaces r&rlz indent.._indent_childrensai  3 ,[ 9  yy  1)DIE5z  4::UZZ%5%5%7. zz!%e,EJ" 3 ,U 3e ;     1 2 3sB))"C C)r-rrrrC)treernrhrlrms ` @@r&rrtsb$ $||~ qyGwOPP t955=()L-,T1r%c>t}|j|||S)zParse XML document into element tree. *source* is a filename or file object containing XML data, *parser* is an optional parser instance defaulting to XMLParser. Return an ElementTree instance. )rr )rrros r&r r s =DJJvv Kr%ct||tdstddndfdGfddtjj }|}d |_tj||S) aJIncrementally parse XML document into ElementTree. This class also reports what's going on to the user based on the *events* it is initialized with. The supported events are the strings "start", "end", "start-ns" and "end-ns" (the "ns" events are used to get detailed namespace information). If *events* is omitted, only "end" events are reported. *source* is a filename or file object containing XML data, *events* is a list of events to report back, *parser* is an optional parser instance. Returns an iterator providing (event, elem) pairs. )events_parserrrTFc3\K jEd{|jd}|snj|>j}jEd{}|||_r|j yy7v7*#r|j wwxYww)Ni@) read_eventsrr_close_and_return_rootrootr)rrrwitr pullparserwrs r&iteratorziterparse..iterators %11333{{9-% 446D!--/ / /B~ 4 0  s?B,BBA B'B(B<B,BBB))B,cBeZdZWWjZfdZy)$iterparse..IterParseIteratorc,rjyyr=)r)r3rrs r&__del__z,iterparse..IterParseIterator.__del__s r%N)r r!r"__next__r)rr{rsr&IterParseIteratorr}sF#,, r%rN) rr)r collectionsabcIteratorrwweakrefref) rrrrrrxrr{ryrzs ` @@@@r&r r st"ff=J 66 "fd#  $KOO44  BBG RB Ir%c8eZdZd dddZdZdZdZdZdZy) rN)rsctj|_|xstt |_|d}|j j |j|y)Nr)end)rdeque _events_queuerrrs _setevents)r3rrrss r&r5zXMLPullParser.__init__sL )..0A);="A >F  2 2F;r%c|j td|r |jj|yy#t$r%}|jj |Yd}~yd}~wwxYw)Feed encoded data to parser.Nz!feed() called after end of stream)rsrr SyntaxErrorrr[)r3rexcs r&rzXMLPullParser.feeds` << @A A  / !!$'  /""))#.. /s8 A&A!!A&cH|jj}d|_|Sr=)rsr)r3rws r&rvz$XMLPullParser._close_and_return_roots ||!!#  r%c$|jy)zFinish feeding data to parser. Unlike XMLParser, does not return the root element. Use read_events() to consume elements from XMLPullParser. N)rvr8s r&rzXMLPullParser.closes ##%r%c#|K|j}|r*|j}t|tr|||r)yyw)zReturn an iterator over currently available (event, elem) pairs. Events are consumed from the internal event queue as they are retrieved from the iterator. N)rpopleftr- Exception)r3rrevents r&ruzXMLPullParser.read_eventss; ##NN$E%+  s7<<cf|j td|jjy)Nz"flush() called after end of stream)rsrflushr8s r&rzXMLPullParser.flush$s( << AB B r%r=) r r!r"r5rrvrrurr$r%r&rrs' rs r&rr*s+ +-0 KK <<>r%c|stt}|j||j}i}|j D]}|j d}|s|||<||fS)aParse XML document from string constant for its IDs. *text* is a string containing XML data, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an (Element, dict) tuple, in which the dict maps element id:s to elements. rr7)rrrrrry)r>rroidsr@r7s r&rr;sd +-0 KK <<>D C  XXd^ CG 9r%c~|stt}|D]}|j||jS)zParse XML document from sequence of string fragments. *sequence* is a list of other sequence, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an Element instance. rr)sequencerr>s r&rrSs5 +-0 D <<>r%cVeZdZdZdddddddZdZdZdZd Zd Z d Z dd Z d Z y)ra8Generic element structure builder. This builder converts a sequence of start, data, and end method calls to a well-formed element structure. You can use this class to build an element structure using a custom XML parser, or a parser for some other XML-like format. *element_factory* is an optional element factory which is called to create new Element instances, as necessary. *comment_factory* is a factory to create comments to be used instead of the standard factory. If *insert_comments* is false (the default), comments will not be inserted into the tree. *pi_factory* is a factory to create processing instructions to be used instead of the standard factory. If *insert_pis* is false (the default), processing instructions will not be inserted into the tree. NF)comment_factory pi_factoryinsert_comments insert_piscg|_g|_d|_d|_d|_|t }||_||_|t}||_ ||_ |t}||_ yr=) _data_elem_lastr_tailr_comment_factoryrr _pi_factoryrr_factory)r3element_factoryrrrrs r&r5zTreeBuilder.__init__ysn      "%O /.  .J%$  "%O' r%c|jS)z;Flush builder buffers and return toplevel document Element.rr8s r&rzTreeBuilder.closeszzr%c|jr^|jJdj|j}|jr||j_n||j_g|_yyNr)rrjoinrr?r>r3r>s r&_flushzTreeBuilder._flushsP ::zz%wwtzz*::&*DJJO'+DJJODJ r%c:|jj|y)zAdd text to current element.N)rr[r3rs r&rzTreeBuilder.datas $r%c|j|j||x|_}|jr|jdj |n|j ||_|jj |d|_|S)zOpen new element and return it. *tag* is the element name, *attrs* is a dict containing element attributes. rar)rrrrr[rr)r3r(attrsr@s r&startzTreeBuilder.startsp  MM#u55 T :: JJrN ! !$ ' ZZ DJ $  r%c|j|jj|_d|_|jS)zOClose and return current Element. *tag* is the element name. r)rrpoprrrs r&rzTreeBuilder.ends2 ZZ^^%  zzr%cP|j|j|j|S)z`Create a comment using the comment_factory. *text* is the text of the comment. )_handle_singlerrrs r&commentzTreeBuilder.comments* ""  ! !4#7#7? ?r%cR|j|j|j||S)zCreate a processing instruction using the pi_factory. *target* is the target name of the processing instruction. *text* is the data of the processing instruction, or ''. )rrr)r3rr>s r&pizTreeBuilder.pis* ""   doovt= =r%c||}|rH|j||_|jr|jdj|d|_|S)Nrar)rrrr[r)r3factoryrbargsr@s r&rzTreeBuilder._handle_singlesG~  KKMDJzz 2%%d+DJ r%r=) r r!r"r#r5rrrrrrrrr$r%r&rresC&(!%$!&5((  " ?=r%rc`eZdZdZddddZdZdZdZdZd Z d Z d Z d Z d Z dZdZy)raaElement structure builder for XML source data based on the expat parser. *target* is an optional target object which defaults to an instance of the standard TreeBuilder class, *encoding* is an optional encoding string which if given, overrides the encoding specified in the XML file: http://www.iana.org/assignments/character-sets N)rrcJ ddlm}|j |d}| t }|x|_|_|x|_|_ |j|_ i|_ |j|_t|dr|j |_t|dr|j$|_t|dr|j(|_t|dr|j,|_t|d r|j0|_t|d r|j4|_t|d r|j8|_d |_d |_d|_ i|_! d |jDz|_#y#t$r" ddl}n#t$r tdwxYwYwxYw#tH$rYywxYw)Nrexpatz7No module named expat; use SimpleXMLTreeBuilder insteadrrrstart_nsend_nsrrrrzExpat %d.%d.%d)% xml.parsersr ImportErrorpyexpat ParserCreaterrrsr_targeterror_error_names_defaultDefaultHandlerExpandr)_startStartElementHandler_endEndElementHandler _start_nsStartNamespaceDeclHandler_end_nsEndNamespaceDeclHandlerrCharacterDataHandlerrCommentHandlerrProcessingInstructionHandler buffer_textordered_attributes_doctypeentity version_infoversionr)r3rrrrs r&r5zXMLParser.__init__s  )##Hc2 > ]F%++ dl%++ dlkk  &*mm# 67 #)-F & 65 !'+yyF $ 6: &/3~~F , 68 $-1\\F * 66 "*0++F ' 69 %$*NNF ! 64 28))F /$%!   +e.@.@@DLM  ' !M ( N   s;E(F( F2E76F7F  FF F"!F"c|j}|j}|D]}|dk(r d|_|||jfd}||_(|dk(r|||j fd}||_F|dk(r6t|jdr|||jfd}n||fd }||_ |d k(r6t|jd r|||jfd }n||fd }||_ |dk(r|||fd}||_ |dk(r|||fd}||_td|zy)Nrrc&|||||fyr=r$)r( attrib_inrr[rs r&handlerz%XMLParser._setevents..handler"sE5i#89:r%rc$||||fyr=r$)r(rr[rs r&rz%XMLParser._setevents..handler'sE3s8,-r%zstart-nsrc&|||||fyr=r$)rrrr[rs r&rz%XMLParser._setevents..handler.sx'<=>r%c,|||xsd|xsdffyrr$)rrrr[s r&rz%XMLParser._setevents..handler2s "ciR'@ABr%zend-nsrc$||||fyr=r$)rrr[rs r&rz%XMLParser._setevents..handler8svf~67r%c||dfyr=r$)rrr[s r&rz%XMLParser._setevents..handler<st}-r%rcJ|||jj|fyr=)rr)r>rr[r3s r&rz%XMLParser._setevents..handler@sE4;;#6#6t#<=>r%rcL|||jj||fyr=)rr) pi_targetrrr[r3s r&rz%XMLParser._setevents..handlerDsE4;;>>)T#BCDr%zunknown event %r)rsr[rrrrrr)rrrrrrrr)r3 events_queueevents_to_reportrr[ event_namers r&rzXMLParser._seteventss5$$*JW$,-)2fC3:0x'4;;1.8'+||8/9.18.y((26?(/%t#3=f!%E7>3 !3j!@AAU+r%cxt|}|j|_|j|jf|_|r=)r codelinenooffsetposition)r3r|errs r& _raiseerrorzXMLParser._raiseerrorKs0::||U\\1  r%cz |j|}|S#t$r|}d|vrd|z}||j|<Y|SwxYw)Nrr)rKeyError)r3rznames r&_fixnamezXMLParser._fixnameQsU $;;s#D   $Dd{Tz#DKK   $s #::cJ|jj|xsd|xsdSr)rrr3rrs r&rzXMLParser._start_ns\s!{{##FLb#)<r data_handlerrrnrerpubidsystems r&rzXMLParser._defaultqsbq S= #{{//  T[[a45s]tBQx;6DM ]] &} $ ::{{   Q    KK 1 1+ >s)7A//B>BBBBB9)r r!r"r#r5rrrrrrrrrrrr$r%r&rrsN"&+Z3Bj =0 .34%l *"?r%r)out from_filec "| | tdd}|tjx}}tt |j fi|}|"|j ||jn| t||||jSdS)a3Convert XML to its C14N 2.0 serialised form. If *out* is provided, it must be a file or file-like object that receives the serialised canonical XML output (text, not bytes) through its ``.write()`` method. To write to a file, open it in text mode with encoding "utf-8". If *out* is not provided, this function returns the output as text string. Either *xml_data* (an XML string) or *from_file* (a file path or file-like object) must be provided as input. The configuration options are the same as for the ``C14NWriterTarget``. Nz:Either 'xml_data' or 'from_file' must be provided as inputr)r) rrrQrrrrrr rS)xml_datarroptionssiors r&rrsI-UVV C {KKM!c .syyDGD EF H    i' _3<<>6$6r%z ^\w+:\w+$ceZdZdZdddddddddZefdZdZddZd Z d jfd Z d Z d Z ddZdZdZdZy)ra Canonicalization writer target for the XMLParser. Serialises parse events to XML C14N 2.0. The *write* function is used for writing out the resulting data stream as text (not bytes). To write to a file, open it in text mode with encoding "utf-8" and pass its ``.write`` method. Configuration options: - *with_comments*: set to true to include comments - *strip_text*: set to true to strip whitespace before and after text content - *rewrite_prefixes*: set to true to replace namespace prefixes by "n{number}" - *qname_aware_tags*: a set of qname aware tag names in which prefixes should be replaced in text content - *qname_aware_attrs*: a set of qname aware attribute names in which prefixes should be replaced in text content - *exclude_attrs*: a set of attribute names that should not be serialised - *exclude_tags*: a set of tag names that should not be serialised FN) with_comments strip_textrewrite_prefixesqname_aware_tagsqname_aware_attrs exclude_attrs exclude_tagsc2||_g|_||_||_|r t |nd|_|r t |nd|_||_|rt ||_nd|_|rt |j|_ nd|_ dgg|_ g|_ |s6|jjttj!|jjgi|_dg|_d|_d|_d|_d|_y)N)r?rFr)_writer_with_comments _strip_textr}_exclude_attrs _exclude_tags_rewrite_prefixes_qname_aware_tags intersection_find_qname_aware_attrs_declared_ns_stack _ns_stackr[rrr _prefix_map_preserve_space_pending_start _root_seen _root_done_ignored_depth) r3rr%r&r'r(r)r*r+s r&r5zC14NWriterTarget.__init__s  +%4Ac-0t2>S.D!1 %()9%:D "%)D " +./@+A+N+ND (+/D ( <$ #  NN ! !$~';';'="> ? b! %w"r%c#DK||D]}|s|Ed{y7wr=r$)r3ns_stack _reversedrms r&_iter_namespacesz!C14NWriterTarget._iter_namespaces(s$#H-J%%%.%s   c|jdd\}}|j|jD]\}}||k(s d|d|cStd|d|d)NrrrrzPrefix z of QName "" is not declared in scope)splitrAr7r)r3 prefixed_namerrrps r&_resolve_prefix_namez%C14NWriterTarget._resolve_prefix_name-sl$**32 ++DNN;FCF{C54&))<76(+m_D^_``r%c|%|dddk(r|ddjddnd|f\}}n|}t}|j|jD]/\}}||k(r||vr|r|d|n|||fcS|j |1|j ro||j vr|j |}n'dt|j x}|j |<|jdj||f|d|||fS|s d|vr|||fS|j|jD]:\}}||k(s |jdj||f|r|d|n|||fcS|s|||fStd|d ) Nrrrrrrraz Namespace "rC) rr}rAr6addr2r8rCr[r7r)r3rrr( prefixes_seenurs r&_qnamezC14NWriterTarget._qname4s ;38!93CuQRy''Q/"eHCC ..t/F/FGIAvCxF-7,2&3%(S#EE   f %H  ! !d&&&))#.34S9I9I5J4K1LL))#.  # #B ' . .V} =XQse$c3. .r.S= ..t~~>IAvCx''+22C=A,2&3%(S#EE? S= ;se+EFGGr%cT|js|jj|yyr=)r=rr[rs r&rzC14NWriterTarget.dataYs""" JJ  d ##r%rc||j}|jdd=|jr|jds|j}|j<|jdc}|_|r t |r|nd}|j g|||y|r(|jr|jt|yyyNra) rr/r9rgr:_looks_like_prefix_namerr;r-_escape_cdata_c14n)r3 _join_textrr qname_texts r&rzC14NWriterTarget._flush]s$**% JJqM   D$8$8$<::D   C/r%c |j4|r2|jDcic]\}}||jvs||}}}|h|}i}|'|j|x} ||<|j| |jX|rV|j |} | r@| D]:} || } t | s|j| x} || <|j| <nd} nd} |j } t|dDcic] }|| | }}|r.|Dcgc]\}}|rd|znd|f}}}|jng}|rVt|jD]:\}}| || vr||vr |||d}||\}} }|j|r|n| |f<|jd}|jj|r|dk(n|jd|j}|d ||dz|r:|d j|Dcgc]\}}d |d t|d c}}|d||t|||dd|_|j"jgycc}}wcc}wcc}}wcc}}w)Nc&|jddS)Nrr)rD)rs r&rz)C14NWriterTarget._start..s!''#q/r%rzxmlns:xmlnsrz+{http://www.w3.org/XML/1998/namespace}spacepreserverarrrrrrT)r0rrGrIr5rPrLrsortr[ryr9r-r_escape_attrib_c14nrQr;r7)r3r(rrVrSrrrresolved_namesrqattrs attr_namer| parse_qnamer parsed_qnamesrrr attr_qnamespace_behaviourrs r&rzC14NWriterTarget._starts    *u&+kkmTmdaq@S@S7SQTmET  !151J1J:1V VEN:. JJu   ' ' 311%8F!'I!),E.u58<8Q8QRW8XXu 5 5) "( Fkk 4: 153453qKN*53 4 $2#1KC'-F"'3?#1  NN I u{{}-1%!v+!~:M%nQ&78;A-:1-=* Is  *A!FG . ))$QR ##-*3M%Nq%QR S b!CU04 8UsI/I/3I5 I:Jc|jr|xjdzc_y|jr|j|jd|j |dd|j j t|j dk(|_|jj |jj y)Nrrrr) r=rrr-rLr9rrCr<r6r7rs r&rzC14NWriterTarget.ends      1 $   :: KKM bS)!,-Q/0   "d223q8 ##% r%c<|jsy|jry|jr|jdn(|jr|j r|j |jdt|d|js|jdyy)Nrz)r.r=r<r-r;rrrQrs r&rzC14NWriterTarget.commentsw""      ?? KK  __ KKM d-d34C89 KK r%c8|jry|jr|jdn(|jr|jr|j |j|rd|dt |dnd|d|js|jdyy)Nrz)r=r<r-r;rrrQ)r3rrs r&rzC14NWriterTarget.pis     ?? KK  __ KKM :>b,T232 6bPRO U KK r%r=)r r!r"r#r5reversedrArGrLrrrrrrrrrr$r%r&rrsj, %"&$#$# J4<& a#HJ$!# 210"C"J   r%rc d|vr|jdd}d|vr|jdd}d|vr|jdd}d|vr|jdd}|S#ttf$rt|YywxYw) NrCrDrrErrFrL rGrs r&rQrQs) $;<<W-D $;<<V,D $;<<V,D 4<<<g.D ~ &)"4()sAAA98A9cP d|vr|jdd}d|vr|jdd}d|vr|jdd}d|vr|jdd}d |vr|jd d }d |vr|jd d }|S#ttf$rt|YywxYw) NrCrDrrErrKrMz rz rLrirGrs r&r\r\s) $;<<W-D $;<<V,D $;<<X.D 4<<<g.D 4<<<g.D 4<<<g.D ~ &)"4()sBBB%$B%)r)_set_factoriesr=r)z r)@r#__all__rrbr8rIrrcollections.abcrrrrrr r rrrrr rrcontextmanagerrrrr2r0rrrrrrrr1rrrVrrrr r rrrrrrrrcompileUNICODEr9rPrrQr\rd _elementtreerkrr$r%r&rrs!P (       # ^^B $&$  +"+"`\/\/B /+/+b;z0(d 0(d    !*-2$*38(.(,16(, %3! ) )8 )!T"&0b''" !%&* &/l 5p77t",  $vvth?h?Z7tt7<%"**\2::>DDD)&). 3K+712  s E,,E43E4PK!7 *__pycache__/__init__.cpython-312.opt-1.pycnu[ ֦iEy)Nr+/usr/lib64/python3.12/xml/etree/__init__.pyrsrPK![*__pycache__/ElementInclude.cpython-312.pycnu[ ֦i(ddlZddlmZddlmZdZedzZedzZdZGd d e Z Gd d e Z dd Z ddefdZ dZy)N) ElementTree)urljoinz!{http://www.w3.org/2001/XInclude}includefallbackc eZdZy)FatalIncludeErrorN__name__ __module__ __qualname__1/usr/lib64/python3.12/xml/etree/ElementInclude.pyr r Crr c eZdZy)LimitedRecursiveIncludeErrorNr rrrrrGrrrc|dk(r:t|d5}tj|j}ddd|S|sd}t|d|5}|j }ddd|S#1swYSxYw#1swYSxYw)NxmlrbzUTF-8r)encoding)openrparsegetrootread)hrefrrfiledatas rdefault_loaderr!Ws ~ $ $$T*224D K H $h /499;D0 K K0 Ks$A-A:-A7:Bc|d}n|dkrtd|zt|dr|j}|t}t ||||t y)Nrz;expected non-negative depth or None for 'max_depth', got %rr) ValueErrorhasattrrr!_includeset)elemloaderbase_url max_depths rrrusW QVYbbcctY||~ ~ T68Y6rcd}|t|kr||}|jtk(r|jd}|r t ||}|jdd}|dk(r||vrt d|z|dk(rt d|z|j||||} | t d|d|tj| } t| |||d z ||j||jr"| jxsd |jz| _ | ||<n|d k(r||||jd } | t d|d||jr| |jz } |r!||d z } | jxsd | z| _ n|jxsd | z|_ ||=t d |z|jtk(rt d|jzt||||||d z }|t|kryy)Nrrrrzrecursive include of %sz5maximum xinclude depth reached when including file %sz cannot load z as rtextrz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r))lentagXINCLUDE_INCLUDEgetrr raddcopyr&removetailr.XINCLUDE_FALLBACK) r(r)r*r+ _parent_hrefsierrnoder.s rr&r&s A c$i- G 55$ $55=Dx.EE'5)E~=(+,E,LMM>6ORVVXX!!$'dE*<+26>yyvtY]MJ$$T*66!%bAFF :DIQ&dE155+<=<+26>66AFFND!9D!%bD 8DI!%bD 8DIG'?%GUU' '#BQUUJ  Q)] C Qg c$i-r)N)r4r-r urllib.parserXINCLUDEr1r7DEFAULT_MAX_INCLUSION_DEPTH SyntaxErrorr rr!rr&rrrr@sff  .i'z)     #4 <1 76rPK!7 *__pycache__/__init__.cpython-312.opt-2.pycnu[ ֦iEy)Nr+/usr/lib64/python3.12/xml/etree/__init__.pyrsrPK!(__pycache__/cElementTree.cpython-312.pycnu[ ֦iRddly))*N)xml.etree.ElementTree//usr/lib64/python3.12/xml/etree/cElementTree.pyrs $rPK!H`##-__pycache__/ElementTree.cpython-311.opt-2.pycnu[ !A?h" gdZdZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z Gdde Z dZGd d Zifd ZdCd ZdCd ZeZGddZGddZejdZdCdZdZhdZdZdZeeedZdZddddddd d!Zee_d"Z d#Z!d$Z"d%Z#dDddd&d'd(Z$Gd)d*ej%Z&dDddd&d'd+Z'd,Z(dEd.Z)dCd/Z*dDd0Z+Gd1d2Z,dCd3Z-dCd4Z.e-Z/dCd5Z0Gd6d7Z1Gd8d9Z2dCddd:d;Z3ej4dZ8d?Z9d@Z: eZ;ddAl$rYdSwxYw)F)CommentdumpElement ElementTree fromstringfromstringlistindent iselement iterparseparse ParseErrorPIProcessingInstructionQName SubElementtostring tostringlist TreeBuilderVERSIONXMLXMLID XMLParser XMLPullParserregister_namespace canonicalizeC14NWriterTargetz1.3.0N) ElementPathceZdZ dS)r N)__name__ __module__ __qualname__B/opt/alt/python-internal/lib64/python3.11/xml/etree/ElementTree.pyr r ks Dr$r c$ t|dS)Ntag)hasattr)elements r%r r ys< 7E " ""r$ceZdZ dZ dZ dZ dZ ifdZdZdZ dZ dZ dZ dZ d Zd Zd Zd Zd ZdZdZdZddZddZddZddZdZddZdZdZdZddZdZ dS)rNc t|tstd|jj||_i|||_g|_dS)Nzattrib must be dict, not ) isinstancedict TypeError __class__r r'attrib _children)selfr'r0extras r%__init__zElement.__init__s\&$'' -) )),-- -))5) r$cJd|jj|jt|fzS)Nz<%s %r at %#x>)r/r r'idr2s r%__repr__zElement.__repr__s!4>#:DHbhh"OOOr$c0 |||SN)r/)r2r'r0s r% makeelementzElement.makeelements ~~c6***r$c` tjdt|S)Nz7elem.copy() is deprecated. Use copy.copy(elem) instead.)warningswarnDeprecationWarning__copy__r7s r%copyz Element.copys3  E    }}r$c||j|j}|j|_|j|_||dd<|Sr:)r;r'r0texttail)r2elems r%r@zElement.__copy__s?$+66I I QQQ r$c*t|jSr:)lenr1r7s r%__len__zElement.__len__s4>"""r$cjtjdtdt|jdkS)NzyThe behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. stacklevelr)r=r> FutureWarningrGr1r7s r%__bool__zElement.__bool__s=  K a     4>""a''r$c|j|Sr:r1r2indexs r% __getitem__zElement.__getitem__s~e$$r$ct|tr|D]}||n||||j|<dSr:)r,slice_assert_is_elementr1)r2rRr)elts r% __setitem__zElement.__setitem__sg eU # # - - -'',,,, -  # #G , , , 'ur$c|j|=dSr:rPrQs r% __delitem__zElement.__delitem__s N5 ! ! !r$cf |||j|dSr:rVr1appendr2 subelements r%r]zElement.appends9   +++ j)))))r$cp |D]1}|||j|2dSr:r\)r2elementsr)s r%extendzElement.extendsO   + +G  # #G , , , N ! !' * * * * + +r$ch |||j||dSr:)rVr1insert)r2rRr_s r%rdzElement.inserts76  +++ eZ00000r$cxt|ts$tdt|jzdS)Nzexpected an Element, not %s)r, _Element_Pyr.typer )r2es r%rVzElement._assert_is_elements@![)) N9DGG tt}||_|Sr:)rrrC)rCr)s r%rrs"gGGL Nr$cf tt}||_|r|jdz|z|_|S)N )rrrC)targetrCr)s r%rrs>+,,GGL 1|c)D0 Nr$cHeZdZ d dZdZdZdZdZdZdZ d Z d Z dS) rNc(|rd|d|}||_dS)N{}rC)r2 text_or_urir's r%r4zQName.__init__s*  8 8&1kk337K r$c|jSr:rr7s r%__str__z QName.__str__s yr$c2d|jjd|jdS)N)r/r rCr7s r%r8zQName.__repr__s  N333TYYY??r$c*t|jSr:)hashrCr7s r%__hash__zQName.__hash__sDIr$cbt|tr|j|jkS|j|kSr:r,rrCr2others r%__le__z QName.__le__0 eU # # +9 * *yE!!r$cbt|tr|j|jkS|j|kSr:rrs r%__lt__z QName.__lt__0 eU # # *9uz) )y5  r$cbt|tr|j|jkS|j|kSr:rrs r%__ge__z QName.__ge__rr$cbt|tr|j|jkS|j|kSr:rrs r%__gt__z QName.__gt__rr$cbt|tr|j|jkS|j|kSr:rrs r%__eq__z QName.__eq__rr$r:) r r!r"r4rr8rrrrrrr#r$r%rrs     @@@"""!!!"""!!!"""""r$rcpeZdZ ddZdZdZddZddZddZddZ dd Z dd Z dd d d Z dZ dS)rNcF||_|r||dSdSr:)_rootr )r2r)files r%r4zElementTree.__init__s3   JJt       r$c |jSr:rr7s r%getrootzElementTree.getroots /zr$c ||_dSr:r)r2r)s r%_setrootzElementTree._setroot#s  r$c d}t|dst|d}d} |Vt}t|dr8|||_|j|r|SS |d}|sn||.||_|j|r|SS#|r|wwxYw)NFreadrbT _parse_wholei)r(openrrrcloserfeed)r2sourceparser close_sourcedatas r%r zElementTree.parse-s  vv&& &$''FL ~"6>22& "(!4!4V!c8 |j|Sr:)rrr2r's r%rzElementTree.iterRs zs###r$c |dddkr$d|z}tjd|ztd|j||SNr/.zThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rrJrK)r=r>rMrrlrms r%rlzElementTree.find^sh  8s??:D M-/34!      ztZ000r$c |dddkr$d|z}tjd|ztd|j|||Sr)r=r>rMrrqrrs r%rqzElementTree.findtexttsl  8s??:D M-/34!      z""4*===r$c |dddkr$d|z}tjd|ztd|j||Sr)r=r>rMrrurms r%ruzElementTree.findallsj  8s??:D M-/34!      z!!$ 333r$c |dddkr$d|z}tjd|ztd|j||Sr)r=r>rMrrwrms r%rwzElementTree.iterfindsj  8s??:D M-/34!      z""4444r$Tshort_empty_elementsc |sd}n|tvrtd|z|s |dkrd}nd}t||5\}}|dkrA|s0|=|dkr%|dvr|d|d |d krt ||jn:t |j|\} } t|} | ||j| | | ddddS#1swxYwYdS) Nxmlzunknown method %rc14nutf-8us-asciiunicode)rrz rCr) _serialize ValueError _get_writerlower_serialize_textr _namespaces) r2file_or_filenameencodingxml_declarationdefault_namespacemethodrwritedeclared_encodingqnamesro serializes r%rzElementTree.writes  . ;FF : % %069:: : &"% )8 4 4 E8R@QO$,^^%%22&,,..6KKK%%%()))tz2222%0=N%O%O" &v.  %VZ/CEEEE E E E E E E E E E E E E E E E E E EsB!C--C14C1c0||dS)Nr)r)r)r2rs r% write_c14nzElementTree.write_c14nszz$vz...r$rr:)NNNN)r r!r"r4rrr rrlrqrurwrrr#r$r%rrs   ####J $ $ $ $1111,>>>>,4444,5555." $ 3E $( 3E3E3E3E3Ej/////r$rc#xK |j}|dkr|t|ddpdfVdStj5}t |t jr|}nt |t jr/t j |}| |j nLt j}d|_ ||_ |j |_ |j|_n#t$rYnwxYwt j||dd}| |j |j|fVddddS#1swxYwYdS#t$rV|dkrd}t#|d|d 5}|j|fVdddYdS#1swxYwYYdSwxYw) NrrrcdSNTr#r#r$r%z_get_writer..sDr$xmlcharrefreplace )rerrorsnewlinew)rr)rrgetattr contextlib ExitStackr,ioBufferedIOBase RawIOBaseBufferedWritercallbackdetachwritableseekabletellAttributeError TextIOWrapperr)rrrstackrs r%rrs-+ & >>  y ( (!1:tDDOO O O O O O%'' +5.0ABB+DD 0",??,-=>>DNN4;////,..D$0LDM!&DJ)9(A $4$9 )'19/B04666 t{+++j(****9 + + + + + + + + + + + + + + + + + + ''' >>  y ( (H "C(,... '15*h& & & & ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 'smEB E C21E 2 C?<E >C??AE  EE7F9 F* F9*F. .F91F. 2F98F9cddiird<fd}|D])}|j}t|tr|jvr||jnHt|t r|vr ||n#|!|t ur|turt|| D]^\}}t|tr|j}|vr ||t|tr|jvr||j_|j}t|tr|jvr||j+fS)Nc |dddkr|dddd\}}|}|9t|}|dtz}|dkr||<|r |d||<dS||<dSrt d||<dS#t $rt |YdSwxYw)Nrrrzns%dr:z.add_qname/s .RaRyC 9++C33S#,,>+//44F~!'#j//!9*0 3(/5vvss$;F5MMM$'F5MMM$$3!&u  . . . &u - - - - - - .sB B/B/B//C  C ) rr'r,rrCrrr rr) rErrr'r|r~rCrors ` @@r%rr$sD\FJ+(* $%.......8 !!h c5 ! ! ,xv%% #(### S ! ! ,&   # _G!3!32 &s + + +**,, & &JC#u%% h&   #%'' &EJf,D,D %*%%%y dE " " !ty'>'> Idi : r$c |j}|j}|tur|d|zn|tur|d|zn||}|5|r|t ||D]}t |||d|na|d|zt |} | s|r|rPt|dD]+\} } | rd| z} |d| d t| d ,| D]k\} } t| tr| j} t| tr|| j} nt| } |d || d | d l|st|s|sP|d |r|t ||D]}t |||d||d |zd zn |d|j r|t |j dSdS)N rrc|dSNrr#xs r%rz _serialize_xml..w QqTr$r|r xmlns=""rr)r'rCrr _escape_cdata_serialize_xmllistrsorted_escape_attribr,rrGrD) rrErrorkwargsr'rCrhrvks r%rras (C 9D g~~ kD !!!! % % % hoSk ; +mD))*** J Jua4HJJJJJ J E#)   &&E 9  9 &z'7'7'9'9+9>!;!;!;1( #aAAA*1----"99DAq!!U++#F!!U++."16N*1--EE&)))QQQ78888 s4yy (< c /E---...NNA"5!VT8LNNNNNdSj3&''''e  y( mDI&&'''''((r$>brhrcolimgwbrareabaselinkmetaembedframeinputparamtrackrisindexbasefontc j|j}|j}|tur|dt|zn|tur|dt|zn||}|3|r|t||D]}t |||dnu|d|zt |}|s|r|rPt|dD]+\} } | rd| z} |d| dt| d ,|D]k\} } t| tr| j} t| tr|| j} nt| } |d || d| d l|d | } |r0| d ks| d kr ||n|t||D]}t |||d| tvr|d|zd z|jr|t|jdSdS)Nr r rc|dSr r#r s r%rz!_serialize_html..rr$rrrrrrrscriptstyler)r'rCrrr_serialize_htmlrrrrr,r_escape_attrib_htmlr HTML_EMPTYrD) rrErrorr'rCrhrrrltags r%r1r1s (C 9D g~~ kM$///0000 % % % ht,,,----Sk ; +mD))*** 8 8q&$7777 8 E#)   &&E 9  9 &z'7'7'9'9+9>!;!;!;1( #aAAA*1----"99DAq!!U++#F!!U++3"16N/22EE&)))QQQ78888 E#JJJ99;;D /8##twE$KKKKE---... 8 8q&$7777:%%dSj3&''' y( mDI&&'''''((r$c||D] }|||jr||jdSdSr:)rrD)rrEparts r%rrsT  d  y dir$)rhtmlrCc tjd|rtdttD]\}}||ks||krt|=|t|<dS)Nzns\d+$z'Prefix format reserved for internal use)rematchrrrr)rrrrs r%rrs~  x 6""DBCCC^))++,,""1 88qF{{q! N3r$rr7rdfwsdlxsxsidc)$http://www.w3.org/XML/1998/namespacezhttp://www.w3.org/1999/xhtmlz+http://www.w3.org/1999/02/22-rdf-syntax-ns#z http://schemas.xmlsoap.org/wsdl/z http://www.w3.org/2001/XMLSchemaz)http://www.w3.org/2001/XMLSchema-instancez http://purl.org/dc/elements/1.1/cRtd|dt|jd)Nzcannot serialize z (type ))r.rgr rs r%rrs1 )+/44d1D1D1DE   r$c d|vr|dd}d|vr|dd}d|vr|dd}|S#ttf$rt|YdSwxYw)N&&r<r>replacer.rrrs r%rrs ) $;;<<W--D $;;<<V,,D $;;<<V,,D ~ &)))"4(((((()AA A65A6c d|vr|dd}d|vr|dd}d|vr|dd}d|vr|dd}d |vr|d d }d |vr|d d }d |vr|d d}|S#ttf$rt|YdSwxYw)NrDrErrFrrGr" z rz  z rHrs r%rrs ) $;;<<W--D $;;<<V,,D $;;<<V,,D 4<<<<h//D 4<<<<g..D 4<<<<g..D 4<<<<g..D ~ &)))"4(((((()sB7B:: CCc d|vr|dd}d|vr|dd}d|vr|dd}|S#ttf$rt|YdSwxYw)NrDrErrGrrLrHrs r%r2r2+s ) $;;<<W--D $;;<<V,,D 4<<<<h//D ~ &)))"4(((((()rJT)rrrc |dkrtjntj}t||||||||S)Nrrrrr)rStringIOBytesIOrrgetvalue)r)rrrrrstreams r%rr:sr ')33R[]]]Fvx/>1B&,4H JJJ ??  r$c.eZdZ dZdZdZdZdZdS)_ListDataStreamc||_dSr:)lst)r2rYs r%r4z_ListDataStream.__init__Ts r$cdSrr#r7s r%rz_ListDataStream.writableWtr$cdSrr#r7s r%rz_ListDataStream.seekableZr[r$c:|j|dSr:)rYr])r2bs r%rz_ListDataStream.write]s r$c*t|jSr:)rGrYr7s r%rz_ListDataStream.tell`s48}}r$N)r r!r"r4rrrrr#r$r%rWrWRsbAr$rWcxg}t|}t||||||||S)NrQ)rWrr)r)rrrrrrYrUs r%rrcsU C S ! !Fvx/>1B&,4H JJJ Jr$c" t|tst|}|tjd|j}|r |ddkr!tjddSdS)Nr)rr)r,rrsysstdoutrrD)rErDs r%rrps dK ( (!4  JJszIJ... <<>> D 48t## $#r$ c t|tr|}|dkrtd|t |sdSd|zzgfd|ddS)Nrz,Initial indentation level must be >= 0, got rc|dz} |}n0#t$r#|z}|YnwxYw|jr|js||_|D]D}t |r |||jr|js||_E|js||_dSdSr ) IndexErrorr]rCstriprGrD)rElevel child_levelchild_indentationchild_indent_children indentationsspaces r%rnz indent.._indent_childrensai  3 ,[ 9   3 3 3 ,U 3e ;     1 2 2 2 2 2 3y *  1 1 *)DI / /E5zz 5   444: /UZ%5%5%7%7 /. z!! -%e,EJJJ - -s *>>)r,rrrrG)treerprjrnros ` @@r%rrs $ $$||~~ qyyOOOPPP t9955=()L-------,T1r$cP t}||||Sr:)rr )rrrqs r%r r s+ ==DJJvv Kr$c t||tdstddndfdGfddtjj}|}d|_tj||S) N)events_parserrrTFc3K Ed{V|d}|sn|H}Ed{V}|||_r|dSdS#r|wwxYw)NTi@) read_eventsrr_close_and_return_rootrootr)rrryitr pullparserwrs r%iteratorziterparse..iterators  &%11333333333{{9--%%%  &4466D!--// / / / / / / /B~    |   s B B))Cc<eZdZjZfdZdS)$iterparse..IterParseIteratorc8rdSdSr:)r)r2rrs r%__del__z,iterparse..IterParseIterator.__del__s&    r$N)r r!r"__next__r)rr}rsr%IterParseIteratorrsE8F##,        r$r) rr(r collectionsabcIteratorryweakrefref) rrtrrrzrr}r{r|s ` @@@@r%r r s  ff===J 66 " "fd##  $KO4    BBG RB Ir$c:eZdZd dddZdZdZdZdZdZdS) rN)ructj|_|ptt |_|d}|j|j|dS)Nr)end)rdeque _events_queuerrru _setevents)r2rtrus r%r4zXMLPullParser.__init__s[ ).00A);=="A"A"A >F  2F;;;;;r$c |jtd|rO |j|dS#t$r%}|j|Yd}~dSd}~wwxYwdS)Nz!feed() called after end of stream)rurr SyntaxErrorrr])r2rexcs r%rzXMLPullParser.feed s* < @AA A  / / !!$''''' / / /"))#......... / / /s7 A&A!!A&cF|j}d|_|Sr:)rur)r2rys r%rxz$XMLPullParser._close_and_return_roots!|!!##  r$c0 |dSr:)rxr7s r%rzXMLPullParser.closes! ##%%%%%r$c#K |j}|r3|}t|tr||V|1dSdSr:)rpopleftr, Exception)r2rtevents r%rwzXMLPullParser.read_events%sj # NN$$E%++        r$cd|jtd|jdS)Nz"flush() called after end of stream)rurflushr7s r%rzXMLPullParser.flush3s3 < ABB B r$r:) r r!r"r4rrxrrwrr#r$r%rrs >r$c |stt}|||}i}|D]}|d}|r|||<||fS)Nrr6)rrrrrr{)rCrrqidsrEr6s r%rrJs 1+--000 KK <<>>D C  XXd^^  CG 9r$c |stt}|D]}|||Srr)sequencerrCs r%rrbsW 1+--000 D <<>>r$cVeZdZ d ddddddZdZdZdZdZd Zd Z d d Z d Z dS)rNF)comment_factory pi_factoryinsert_comments insert_piscg|_g|_d|_d|_d|_|t }||_||_|t}||_ ||_ |t}||_ dSr:) _data_elem_lastr_tailr_comment_factoryrr _pi_factoryrr_factory)r2element_factoryrrrrs r%r4zTreeBuilder.__init__sr      "%O /.  .J%$  "%O' r$c |jSr:rr7s r%rzTreeBuilder.closesIzr$c|jrJ|j:d|j}|jr ||j_n ||j_g|_dSdSNr)rrjoinrrDrCr2rCs r%_flushzTreeBuilder._flushs\ : z%wwtz**:+&*DJOO'+DJODJJJ  r$c< |j|dSr:)rr]r2rs r%rzTreeBuilder.datas!* $r$c ||||x|_}|jr!|jd|n|j||_|j|d|_|S)Nrbr)rrrrr]rr)r2r'attrsrEs r%startzTreeBuilder.starts  MM#u555 T :  JrN ! !$ ' ' ' ' Z DJ $  r$c ||j|_d|_|jSr )rrpoprrrs r%rzTreeBuilder.ends: Z^^%%  zr$cF ||j|j|Sr:)_handle_singlerrrs r%commentzTreeBuilder.comments. ""  !4#7?? ?r$cH ||j|j||Sr:)rrr)r2rrCs r%pizTreeBuilder.pis/ ""  dovt== =r$c||}|rI|||_|jr |jd|d|_|S)Nrbr)rrrr]r)r2factoryrdargsrEs r%rzTreeBuilder._handle_singlesYw~   KKMMMDJz , 2%%d+++DJ r$r:) r r!r"r4rrrrrrrrr#r$r%rrts&(!%$!&5((((((      "   ???====r$rc`eZdZ ddddZdZdZdZdZdZd Z d Z d Z d Z d Z dZdS)rN)rrc@ ddlm}n3#t$r& ddl}n#t$rtdwxYwYnwxYw||d}|t }|x|_|_|x|_|_ |j |_ i|_ |j |_t|dr |j|_t|dr |j|_t|dr |j|_t|dr |j|_t|d r |j|_t|d r |j|_t|d r |j|_d |_d |_d|_ i|_! d |j"z|_#dS#tH$rYdSwxYw)Nrexpatz7No module named expat; use SimpleXMLTreeBuilder insteadrrrstart_nsend_nsrrrrzExpat %d.%d.%d)% xml.parsersr ImportErrorpyexpat ParserCreaterrrur_targeterror_error_names_defaultDefaultHandlerExpandr(_startStartElementHandler_endEndElementHandler _start_nsStartNamespaceDeclHandler_end_nsEndNamespaceDeclHandlerrCharacterDataHandlerrCommentHandlerrProcessingInstructionHandler buffer_textordered_attributes_doctypeentity version_infoversionr)r2rrrrs r%r4zXMLParser.__init__s  ) ) ) ) ) ) )    '''''   !M (' ##Hc22 > ]]F%++ dl%++ dlk  &*m# 67 # # 5)-F & 65 ! ! 1'+yF $ 6: & & >/3~F , 68 $ $ :-1\F * 66 " " 6*0+F ' 69 % % 3$*NF ! 64  <28)F /$%!   +e.@@DLLL    DD s. 99399>F FFc|j}|j}|D]}|dkrd|_|||jfd}||_#|dkr|||jfd}||_=|dkr0t|jdr |||j fd}n||fd }||_ s|d kr0t|jd r |||j fd }n||fd }||_ |dkr|||fd}||_ |dkr|||fd}||_td|zdS)Nrrc4|||||fdSr:r#)r' attrib_inrr]rs r%handlerz%XMLParser._setevents..handler1s)FE55i#8#89:::::r$rc2||||fdSr:r#)r'rr]rs r%rz%XMLParser._setevents..handler6s%FE33s88,-----r$zstart-nsrc4|||||fdSr:r#)rrrr]rs r%rz%XMLParser._setevents..handler=s)xx'<'<=>>>>>r$c,|||pd|pdffdSrr#)rrrr]s r%rz%XMLParser._setevents..handlerAs* "ciR'@ABBBBBr$zend-nsrc2||||fdSr:r#)rrr]rs r%rz%XMLParser._setevents..handlerGs%vvf~~677777r$c ||dfdSr:r#)rrr]s r%rz%XMLParser._setevents..handlerKst}-----r$rcP|||j|fdSr:)rr)rCrr]r2s r%rz%XMLParser._setevents..handlerOs-FE4;#6#6t#<#<=>>>>>r$rcR|||j||fdSr:)rr) pi_targetrrr]r2s r%rz%XMLParser._setevents..handlerSs-FE4;>>)T#B#BCDDDDDr$zunknown event %r)rur]rrrrrr(rrrrrrrr)r2 events_queueevents_to_reportrr] event_namers r%rzXMLParser._setevents%s$** B* BJW$$,-)2fCCCC3:00x''4;11..8'+|88888/9....18..y(((26????(/%%t##3=f!%EEEE7>33 !3j!@AAAU* B* Br$cbt|}|j|_|j|jf|_|r:)r codelinenooffsetposition)r2r~errs r% _raiseerrorzXMLParser._raiseerrorZs-:|U\1  r$cn |j|}n%#t$r|}d|vrd|z}||j|<YnwxYw|S)Nrr)rKeyError)r2r|names r%_fixnamezXMLParser._fixname`s` $;s#DD $ $ $Dd{{Tz#DK     $  s 22c@|j|pd|pdSr)rrr2rrs r%rzXMLParser._start_nsks"{##FLb#)<<tdt|dD]}||dz||||< |j||S)NrrJr)rrangerGrr)r2r' attr_listfixnamer0is r%rzXMLParser._startqs-gcll  ?1c)nna00 ? ?09!A#wwy|,,--{  f---r$c\|j||Sr:)rrrrs r%rzXMLParser._end}s"{t}}S11222r$c|dd}|dkr |jj}n#t$rYdSwxYw ||j|dddS#t$raddlm}|d||jj |jj fz}d|_ |jj |_ |jj |_ |wxYw|dkr|dd d kr g|_dS|j|d kr d|_dS|}|sdS|j|t#|j}|d kr|jd}|d kr|dkr|j\}}} } | r | dd} n|dkr|dkr|j\}}} d} ndSt%|jdr%|j|| | ddn*t%|drt)jdt,d|_dSdSdS)NrrDrbrrz'undefined entity %s: line %d, column %d r z RuntimeWarning) r2rCr data_handlerrrnrgrpubidsystems r%rzXMLParser._defaults}bqb S== #{/ !      T[ad455555   ------kk=4;6K133 ![8 ![:   s]]tBQBx;66DMMM ] &}} $ ::< AAA A* B* A74B6A77B Bcp|j} |jd|jddn,#|j$r}||Yd}~nd}~wwxYw|j|dS#|j|wxYw)NFr$)rGetReparseDeferralEnabledSetReparseDeferralEnabledrrr)r2 was_enabledrs r%rzXMLParser.flushsk;;==  ? K 1 1% 8 8 8 K  c5 ) ) ) ){     Q          K 1 1+ > > > > >DK 1 1+ > > > >s/5AB A:A50B5A::BB5)r r!r"r4rrrrrrrrrrrr#r$r%rrs"&+++++Z3B3B3Bj   ===000 . . .3334%4%4%l   ***"?????r$r)out from_filec J ||tdd}|tjx}}tt |jfi|}|*|||n|t|||| ndS)Nz:Either 'xml_data' or 'from_file' must be provided as inputr)r) rrrRrrrrrr rT)xml_datar r!optionssiors r%rrs I-UVVV C {KMM!c .syDDGDD E E EF H    i'''' _3<<>>>$6r$z ^\w+:\w+$ceZdZ dddddddddZefdZdZddZdZd j fd Z d Z d Z dd Z dZdZdZdS)rFN) with_comments strip_textrewrite_prefixesqname_aware_tagsqname_aware_attrs exclude_attrs exclude_tagscX||_g|_||_||_|rt |nd|_|rt |nd|_||_|rt ||_nd|_|rt |j |_ nd|_ dgg|_ g|_ |s>|j tt|j gi|_dg|_d|_d|_d|_d|_dS)N)r@rFr)_writer_with_comments _strip_textr_exclude_attrs _exclude_tags_rewrite_prefixes_qname_aware_tags intersection_find_qname_aware_attrs_declared_ns_stack _ns_stackr]rrr _prefix_map_preserve_space_pending_start _root_seen _root_done_ignored_depth) r2rr'r(r)r*r+r,r-s r%r4zC14NWriterTarget.__init__sE  +%4AKc-000t2>HS...D!1  *%()9%:%:D " "%)D "  0+./@+A+A+ND ( (+/D ( <$ #  @ N ! !$~';';'='=">"> ? ? ? b!!! %w"r$c#:K||D] }|r|Ed{V dSr:r#)r2ns_stack _reversedros r%_iter_namespacesz!C14NWriterTarget._iter_namespaces7sJ#)H-- & &J &%%%%%%%% & &r$c|dd\}}||jD]\}}||kr d|d|cStd|d|d)NrrrrzPrefix z of QName "" is not declared in scope)splitrCr9r)r2 prefixed_namerrrps r%_resolve_prefix_namez%C14NWriterTarget._resolve_prefix_name<s$**322 ++DN;; * *FCF{{)C))4)))))_6__m___```r$c|4|dddkr|ddddnd|f\}}n|}t}||jD]4\}}||kr||vr|r|d|n|||fcS||5|jrd||jvr|j|}n!dt|jx}|j|<|jd||f|d|||fS|s d|vr|||fS||j D]=\}}||kr2|jd||f|r|d|n|||fcS>|s|||fStd|d ) Nrrrrrrrbz Namespace "rE) rrrCr8addr4r:rGr]r9r)r2rrr' prefixes_seenurs r%_qnamezC14NWriterTarget._qnameCs$ ;38!93C3CuQRRy''Q///"eHCC ..t/FGG & &IAvCxxF-77,2;&((3(((S#EEEE   f % % % %  ! /d&&&)#.1LS9I5J5J1L1LL)#.  #B ' . .V} = = =$$s$$c3. . !r..S= ..t~>> F FIAvCxx'+22C=AAA,2;&((3(((S#EEEE !S= FsFFFGGGr$cL|js|j|dSdSr:)r?rr]rs r%rzC14NWriterTarget.datahs3" $ J  d # # # # # $ $r$rcd||j}|jdd=|jr!|jds|}|j7|jdc}|_|rt |r|nd}|jg||R|dS|r+|jr&|t|dSdSdSNrb) rr1r;rir<_looks_like_prefix_namerr=r/_escape_cdata_c14n)r2 _join_textrr qname_texts r%rzC14NWriterTarget._flushlsz$*%% JqqqM   D$8$< ::<D  F C/////r$cj"|r fd|D}|h|}i}|/|x}||<||jh|rf|}|rL|D]H} || } t | r/| x}|| <||Ind}nd}jfdt|dD} |r!d|D} | ng} |rlt|D]J\} }|| |vr||vr| ||d}| | \}} }| |r|n| |fK| d}j |r|dkn j d j }|d | |dz| r(|d d | D|d |*|t| ||dd_j gdS)Nc.i|]\}}|jv||Sr#)r2).0rrr2s r% z+C14NWriterTarget._start..s,TTTdaq@S7S7SQ7S7S7Sr$c(i|]}||Sr#r#)r[r parse_qnames r%r\z+C14NWriterTarget._start..s/444qKKNN444r$c.|ddS)Nrr)rF)rs r%rz)C14NWriterTarget._start..s!''#q//r$rc*g|]\}}|rd|znd|fS)zxmlns:xmlnsr#)r[rrs r% z+C14NWriterTarget._start..s@C'-9F""'3?r$rz+{http://www.w3.org/XML/1998/namespace}spacepreserverbrrc@g|]\}}d|dt|dS)rrr)_escape_attrib_c14n)r[rrs r%rbz+C14NWriterTarget._start..s9TTT$!Q=q==$7$:$:===TTTr$rT)r2rrIrKr7rRrNrsortr]r{r;r/rrSr=r9)r2r'rrXrUrresolved_namesrqattrs attr_namer~ parsed_qnamesrrr attr_qnamerspace_behaviourrr^s` @r%rzC14NWriterTarget._starts6   *u *TTTTekkmmTTTE  !151J1J:1V1V VEN:. JJu     ' 3 311%88F !'**I!),E.u55*8<8Q8QRW8X8XXu 5 5))) * Fk 4444F 11535353444   #1I NN    I  Hu{{}}-- H H1%!v++!~:M:M%nQ&78;A-:1-=* Is  "B**A!FGGGG ))$QRR ##-< *Oz ) )%b) + + +   cM#&q))***  W E"''TT)TTTUU V V V c   ! E$]>*3M%Nq%QRR S S S b!!!!!r$c|jr|xjdzc_dS|jr||d||dd|jt|jdk|_|j |j dS)Nrrrr) r?rrr/rNr;rrGr>r8r9rs r%rzC14NWriterTarget.ends      1 $   F :  KKMMM /S))!,///000   """d233q8 ##%%% r$c0|jsdS|jrdS|jr|dn"|jr|jr||dt|d|js|ddSdS)Nrz)r0r?r>r/r=rrrSrs r%rzC14NWriterTarget.comments"  F    F ?  KK     _   KKMMM 8-d33888999  KK       r$c4|jrdS|jr|dn"|jr|jr|||rd|dt |dnd|d|js|ddSdS)Nrz)r?r>r/r=rrrS)r2rrs r%rzC14NWriterTarget.pis    F ?  KK     _   KKMMM :> S 6 6 6,T22 6 6 6 6OOOO U U U  KK       r$r:)r r!r"r4reversedrCrIrNrrrrrrrrrr#r$r%rrs, %"&$#$# # # # # J4<&&&& aaa#H#H#H#HJ$$$!# 2 2 2 2111000"C"C"C"C"J           r$rc& d|vr|dd}d|vr|dd}d|vr|dd}d|vr|dd}|S#ttf$rt|YdSwxYw) NrDrErrFrrGrM rHrs r%rSrSs) $;;<<W--D $;;<<V,,D $;;<<V,,D 4<<<<g..D ~ &)))"4(((((()sA)A,, BBc d|vr|dd}d|vr|dd}d|vr|dd}d|vr|dd}d |vr|d d }d |vr|d d }|S#ttf$rt|YdSwxYw) NrDrErrFrrLrNz rz rMrrrHrs r%reres) $;;<<W--D $;;<<V,,D $;;<<X..D 4<<<<g..D 4<<<<g..D 4<<<<g..D ~ &)))"4(((((()sBB CC)r)_set_factoriesr:r)rer)?__all__rrcr9r=rrcollections.abcrrrrrr r rrrrr rrcontextmanagerrrrr3r1rrrrrrrr2rrrWrrrr r rrrrrrrrcompileUNICODEr:rRrrSrerf _elementtreertrr#r$r%r{s"!P   (             ### jjjjjjjjZ $&$     +"+"+"+"+"+"+"+"`_/_/_/_/_/_/_/_/H /+/+/+b;;;;z0(0(0(d 0(0(0(d    !!!*-2$*38(.(,16(,  %3!   ))) )))8 ) ) )!T"&0b'" !%&*     &////l    5555p77777777t",     $vvvvvvvvth?h?h?h?h?h?h?h?Z7tt77777<%"*\2:>>DD)))&))). 3K++++++N7122222   DD s E66E?>E?PK!W*__pycache__/__init__.cpython-311.opt-2.pycnu[ !A?hEdS)Nr?/opt/alt/python-internal/lib64/python3.11/xml/etree/__init__.pyrsrPK!CfY.__pycache__/cElementTree.cpython-311.opt-1.pycnu[ !A?hRddlTdS))*N)xml.etree.ElementTreeC/opt/alt/python-internal/lib64/python3.11/xml/etree/cElementTree.pyrs$#####rPK!~h@eCeC-__pycache__/ElementPath.cpython-311.opt-1.pycnu[ !A?h6ddlZejdZddZdZdZdZdZdZd Z d Z d Z d Z eee e e e d Z iZGddZddZddZddZddZdS)Nz`('[^']*'|\"[^\"]*\"|::|//?|\.\.|\(\)|!=|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@!=\s]+)|\s+c#K|r|dnd}d}t|D]}|\}}|r|ddkrsd|vrW|dd\}} |st|d||d|fVn6#t$rt d|zdwxYw|r|s |d|d|fVn|Vd}|V|d k}dS) NFr{:}z!prefix %r not found in prefix map@)getxpath_tokenizer_refindallsplitKeyError SyntaxError) pattern namespacesdefault_namespaceparsing_attributetokenttypetagprefixuris B/opt/alt/python-internal/lib64/python3.11/xml/etree/ElementPath.pyxpath_tokenizerrJsY.8B r***d#++G44-- s  -3q6S==czz!iiQ// ^%'&%Z-?-?-?!EEEEEE^^^%&IF&RSSY]]^" +< e):):):CC@@@@@@ %  KKK %  %--s +BB%cv|j}|/ix|_}|jD] }|D]}|||< |SN) parent_maprootiter)contextrpes rget_parent_mapr#bs_#J*,,Z""$$ " "A " " ! 1  " c:|dddkp |dddkS)N{*}}*rs r_is_wildcard_tagr,ls' rr7e  /s233x4//r$cttcdkrfd}ndkrfd}ndddkr<ddtt dddfd}nPd dd kr0dd tdtfd }nt d |S)Nz{*}*c3@K|D]}|jr|VdSrr+)r resultelem _isinstance_strs rselectz_prepare_tag..selectvs@  ;tx..JJJ  r$z{}*c3\K|D]%}|j}|r|ddkr|V&dS)Nrrr+)r r/r0el_tagr1r2s rr3z_prepare_tag..select|sS  ;vt,,c1A1AJJJ  r$r&r'c3hK|D]+}|j}|ks|r|kr|V,dSrr+) r r/r0r5r1r2no_nssuffixrs rr3z_prepare_tag..selectsY  S==KK$=$==&-SYBYBYJJJ  r$r(r)c3\K|D]%}|j}|r|kr|V&dSrr+)r r/r0r5r1r2nsns_onlys rr3z_prepare_tag..selectsS  ;vt,,B1F1FJJJ  r$zinternal parser error, got ) isinstancestrslicelen RuntimeError)rr3r1r2r8r<r=r9s` @@@@@@r _prepare_tagrCpsi"CK f}}                RaRE  QRRs6{{lD))!""g           RSST   "Xc"gg&&          >>>??? Mr$c|dtrtfd}ndddkr ddfd}|S)Nrc4d}|||S)Nc3$K|D] }|Ed{V dSrr*)r/r0s r select_childz3prepare_child..select..select_childs2"$$D#OOOOOOOO$$r$r*r r/rG select_tags rr3zprepare_child..selects0 $ $ $:g||F';';<< K|D]}|D]}|jkr|VdSrr+r r/r0r"rs rr3zprepare_child..selectsI    Au||   r$)r,rCnextrr3rIrs @@r prepare_childrOs (C !#&&  = = = = = = rr7d??abb'C     Mr$c d}|S)Nc3$K|D] }|Ed{V dSrr*)r r/r0s rr3zprepare_star..selects2  DOOOOOOOO  r$r*rNrr3s r prepare_starrSs Mr$c d}|S)Nc3K|Ed{VdSrr*)r r/s rr3zprepare_self..selects$r$r*rRs r prepare_selfrVs Mr$c$ |}n#t$rYdSwxYw|ddkrdn |ds |dntdtrtfd}ndddkr ddfd}|S) Nr*rzinvalid descendantc4d}|||S)Nc3RK|D]!}|D] }||ur|V "dSrr)r/r0r"s rrGz8prepare_descendant..select..select_childsN"$$D!YY[[$$D=="#GGG$$$r$r*rHs rr3z"prepare_descendant..selects0 $ $ $ :g||F';';<< .selectsQ  3  A}}   r$) StopIterationrr,rCrMs @@rprepare_descendantr^s  Qx3 1X0Ah./// !#&&  = = = = = = rr7d??abb'C     Ms  c d}|S)Nc3hKt|}i}|D]}||vr||}||vr d||<|VdSr)r#)r r/r result_mapr0parents rr3zprepare_parent..selectse#G,,   ! !Dz!!#D)++)-Jv& LLL  ! !r$r*rRs rprepare_parentrcs ! ! ! Mr$c g}g} |}n#t$rYdSwxYw|ddkrnl|dkr2|dr$|ddddvrd|dddf}||dpd||dd |}|d kr|dfd }|S|d ks|d kr$|d|d  fd} fd}d|vr|n|S|dkr*tjd|ds|dfd}|S|dks-|dks'|dks|dkrLtjd|ds1|d|d r  fd} fd}n fd} fd}d|vr|n|S|dks |dks|dkr|dkr.t |ddz dkrt dnp|ddkrt d|dkrM t |d dz n#t$rt d!wxYwd"krt d#ndfd$}|St d%)&Nrr])rrz'"'r:-rz@-c3HK|D]}||VdSrr )r r/r0keys rr3z!prepare_predicate..selects:  88C==,JJJ  r$z@-='z@-!='c3PK|D]}|kr|V dSrri)r r/r0rjvalues rr3z!prepare_predicate..selects?  88C==E))JJJ  r$c3XK|D]#}|x} |kr|V$dSrri)r r/r0 attr_valuerjrls rselect_negatedz)prepare_predicate..select_negatedsI  "&((3--/J<uATATJJJ  r$z!=z\-?\d+$c3HK|D]}||VdSr)find)r r/r0rs rr3z!prepare_predicate..selects:  99S>>-JJJ  r$z.='z.!='z-='z-!='c3K|D]K}|D]3}d|kr|Vn4LdSNr)r joinitertextr r/r0r"rrls rr3z!prepare_predicate..selectsn"""D!\\#..""771::<<00E99"&JJJ!E:""r$c3K|D]K}|D]3}d|kr|Vn4LdSrs)iterfindrtrurvs rroz)prepare_predicate..select_negated"sn"""D!]]3//""771::<<00E99"&JJJ!E:""r$c3tK|D]1}d|kr|V2dSrsrtrur r/r0rls rr3z!prepare_predicate..select)I"##Dwwt}}//588" ##r$c3tK|D]1}d|kr|V2dSrsrzr{s rroz)prepare_predicate..select_negated-r|r$z-()z-()-zXPath position >= 1 expectedlastzunsupported functionr6zunsupported expressionr(z)XPath offset from last() must be negativec3Kt|}|D]W} ||}t||j}||ur|VA#tt f$rYTwxYwdSr)r#listr r IndexErrorr)r r/rr0rbelemsindexs rr3z!prepare_predicate..selectEs'00J  '-F !9!9::EU|t++" "H-D  s=AA*)A*zinvalid predicate)r]appendrtrematchintr ValueError) rNr signature predicater3rorrjrrls @@@@rprepare_predicatersII # DFFEE    FF  8s??  H    8 (a! --q!B$'EqS)))q""" # ""IDl      Fi722l"             "&!2!2~~>CYq\ B Bl      EY&00 %  9#6#6HZ166$7l"   # " " " " " "  " " " " " " " # # # # # # # # # #"&!2!2~~>C9--f1D1D    ! %%)Eqyy!"@AAA|v%%!"8999F""@ ! --1EE!@@@%&>???@2::%&QRRR      ) * **s  $$6HH))rrX.z..z//[ceZdZdZdZdS)_SelectorContextNc||_dSr)r)selfrs r__init__z_SelectorContext.__init__`s  r$)__name__ __module__ __qualname__rrr*r$rrr^s(Jr$rcZ|dddkr|dz}|f}|r1|tt|z } t|}n.#t$r t tdkrt|dddkrtdtt||j } |}n#t$rYYdSwxYwg} | t|d||n#t$rtddwxYw |}|ddkr |}n#t$rYnwxYw|t|<YnwxYw|g}t|}|D]} | ||}|S) Nr:/rXdrz#cannot use absolute path on elementrz invalid path)tuplesorteditems_cacherrAclearrrr__next__r]ropsr) r0pathr cache_keyselectorrNrr/r r3s rrxrxhs  BCCyCczI7U6*"2"2"4"455666 %)$ %%% v;;   LLNNN 8s??CDD DOD*5566? DFFEE    FFF   <E!H dE : :;;;;  < < <!.11t; < 8s?? DFFE      %y-%0VFt$$G))(( Mss AA;F C! F! C0+F/C00F7/D'&F'EF E'&F' E41F3E44FFc@tt|||dSr)rNrxr0rrs rrqrqs tZ00$ 7 77r$c>tt|||Sr)rrxrs rr r s tZ00 1 11r$c tt|||}|jdS|jS#t$r|cYSwxYwrs)rNrxtextr])r0rdefaultrs rfindtextrsYHT44455 9 2y s%00 ??r)NN)rcompiler rr#r,rCrOrSrVr^rcrrrrrxrqr rr*r$rrstv RZ    ----0000&&&R&  >   n+n+n+b        ''''X8888 2222 r$PK!W$__pycache__/__init__.cpython-311.pycnu[ !A?hEdS)Nr?/opt/alt/python-internal/lib64/python3.11/xml/etree/__init__.pyrsrPK!xTK""0__pycache__/ElementInclude.cpython-311.opt-2.pycnu[ !A?hddlZddlmZddlmZdZedzZedzZdZGd d e Z Gd d e Z dd Z ddefdZ dZdS)N) ElementTree)urljoinz!{http://www.w3.org/2001/XInclude}includefallbackceZdZdS)FatalIncludeErrorN__name__ __module__ __qualname__E/opt/alt/python-internal/lib64/python3.11/xml/etree/ElementInclude.pyr r CDrr ceZdZdS)LimitedRecursiveIncludeErrorNr rrrrrGrrrc4|dkrOt|d5}tj|}dddn #1swxYwYnB|sd}t|d|5}|}dddn #1swxYwY|S)NxmlrbzUTF-8r)encoding)openrparsegetrootread)hrefrrfiledatas rdefault_loaderr!Ws ~~ $   5$T**2244D 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 H $h / / / 499;;D                Ks#'A  AA,B  BBc|d}n|dkrtd|zt|dr|}|t}t ||||t dS)Nrz;expected non-negative depth or None for 'max_depth', got %rr) ValueErrorhasattrrr!_includeset)elemloaderbase_url max_depths rrrtsv QVYbbccctY||~~ ~ T68Y66666rcNd}|t|kr||}|jtkr|d}|rt ||}|dd}|dkr||vrt d|z|dkrt d|z|||||} | t d|d|tj| } t| |||d z || ||j r| j pd |j z| _ | ||<n|d kr}||||d } | t d|d||j r | |j z } |r||d z } | j pd | z| _ n|j pd | z|_ ||=t d |z|jtkrt d|jzt||||||d z }|t|k dSdS)Nrrrrzrecursive include of %sz5maximum xinclude depth reached when including file %sz cannot load z as rtextrz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r))lentagXINCLUDE_INCLUDEgetrr raddcopyr&removetailr.XINCLUDE_FALLBACK) r(r)r*r+ _parent_hrefsierrnoder.s rr&r&s A c$ii-- G 5$ $ $55==D /x..EE'5))E~~=((+,E,LMMM>>6ORVVXXX!!$'''vdE**<++26$$>yvtY]MJJJ$$T***6;!%bAF :DIQ&vdE155+<+<==<++26$$>6#AFND9!9D!%bD 8DII!%bD 8DIG'?%GU' ' '#BQUJ  Q)] C C C Qg c$ii------r)N)r4r-r urllib.parserXINCLUDEr1r7DEFAULT_MAX_INCLUSION_DEPTH SyntaxErrorr rr!rr&rrrr@sf  .i'z)               #4      :1 7 7 7 766666rPK!CfY.__pycache__/cElementTree.cpython-311.opt-2.pycnu[ !A?hRddlTdS))*N)xml.etree.ElementTreeC/opt/alt/python-internal/lib64/python3.11/xml/etree/cElementTree.pyrs$#####rPK!~h@eCeC'__pycache__/ElementPath.cpython-311.pycnu[ !A?h6ddlZejdZddZdZdZdZdZdZd Z d Z d Z d Z eee e e e d Z iZGddZddZddZddZddZdS)Nz`('[^']*'|\"[^\"]*\"|::|//?|\.\.|\(\)|!=|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@!=\s]+)|\s+c#K|r|dnd}d}t|D]}|\}}|r|ddkrsd|vrW|dd\}} |st|d||d|fVn6#t$rt d|zdwxYw|r|s |d|d|fVn|Vd}|V|d k}dS) NFr{:}z!prefix %r not found in prefix map@)getxpath_tokenizer_refindallsplitKeyError SyntaxError) pattern namespacesdefault_namespaceparsing_attributetokenttypetagprefixuris B/opt/alt/python-internal/lib64/python3.11/xml/etree/ElementPath.pyxpath_tokenizerrJsY.8B r***d#++G44-- s  -3q6S==czz!iiQ// ^%'&%Z-?-?-?!EEEEEE^^^%&IF&RSSY]]^" +< e):):):CC@@@@@@ %  KKK %  %--s +BB%cv|j}|/ix|_}|jD] }|D]}|||< |SN) parent_maprootiter)contextrpes rget_parent_mapr#bs_#J*,,Z""$$ " "A " " ! 1  " c:|dddkp |dddkS)N{*}}*rs r_is_wildcard_tagr,ls' rr7e  /s233x4//r$cttcdkrfd}ndkrfd}ndddkr<ddtt dddfd}nPd dd kr0dd tdtfd }nt d |S)Nz{*}*c3@K|D]}|jr|VdSrr+)r resultelem _isinstance_strs rselectz_prepare_tag..selectvs@  ;tx..JJJ  r$z{}*c3\K|D]%}|j}|r|ddkr|V&dS)Nrrr+)r r/r0el_tagr1r2s rr3z_prepare_tag..select|sS  ;vt,,c1A1AJJJ  r$r&r'c3hK|D]+}|j}|ks|r|kr|V,dSrr+) r r/r0r5r1r2no_nssuffixrs rr3z_prepare_tag..selectsY  S==KK$=$==&-SYBYBYJJJ  r$r(r)c3\K|D]%}|j}|r|kr|V&dSrr+)r r/r0r5r1r2nsns_onlys rr3z_prepare_tag..selectsS  ;vt,,B1F1FJJJ  r$zinternal parser error, got ) isinstancestrslicelen RuntimeError)rr3r1r2r8r<r=r9s` @@@@@@r _prepare_tagrCpsi"CK f}}                RaRE  QRRs6{{lD))!""g           RSST   "Xc"gg&&          >>>??? Mr$c|dtrtfd}ndddkr ddfd}|S)Nrc4d}|||S)Nc3$K|D] }|Ed{V dSrr*)r/r0s r select_childz3prepare_child..select..select_childs2"$$D#OOOOOOOO$$r$r*r r/rG select_tags rr3zprepare_child..selects0 $ $ $:g||F';';<< K|D]}|D]}|jkr|VdSrr+r r/r0r"rs rr3zprepare_child..selectsI    Au||   r$)r,rCnextrr3rIrs @@r prepare_childrOs (C !#&&  = = = = = = rr7d??abb'C     Mr$c d}|S)Nc3$K|D] }|Ed{V dSrr*)r r/r0s rr3zprepare_star..selects2  DOOOOOOOO  r$r*rNrr3s r prepare_starrSs Mr$c d}|S)Nc3K|Ed{VdSrr*)r r/s rr3zprepare_self..selects$r$r*rRs r prepare_selfrVs Mr$c$ |}n#t$rYdSwxYw|ddkrdn |ds |dntdtrtfd}ndddkr ddfd}|S) Nr*rzinvalid descendantc4d}|||S)Nc3RK|D]!}|D] }||ur|V "dSrr)r/r0r"s rrGz8prepare_descendant..select..select_childsN"$$D!YY[[$$D=="#GGG$$$r$r*rHs rr3z"prepare_descendant..selects0 $ $ $ :g||F';';<< .selectsQ  3  A}}   r$) StopIterationrr,rCrMs @@rprepare_descendantr^s  Qx3 1X0Ah./// !#&&  = = = = = = rr7d??abb'C     Ms  c d}|S)Nc3hKt|}i}|D]}||vr||}||vr d||<|VdSr)r#)r r/r result_mapr0parents rr3zprepare_parent..selectse#G,,   ! !Dz!!#D)++)-Jv& LLL  ! !r$r*rRs rprepare_parentrcs ! ! ! Mr$c g}g} |}n#t$rYdSwxYw|ddkrnl|dkr2|dr$|ddddvrd|dddf}||dpd||dd |}|d kr|dfd }|S|d ks|d kr$|d|d  fd} fd}d|vr|n|S|dkr*tjd|ds|dfd}|S|dks-|dks'|dks|dkrLtjd|ds1|d|d r  fd} fd}n fd} fd}d|vr|n|S|dks |dks|dkr|dkr.t |ddz dkrt dnp|ddkrt d|dkrM t |d dz n#t$rt d!wxYwd"krt d#ndfd$}|St d%)&Nrr])rrz'"'r:-rz@-c3HK|D]}||VdSrr )r r/r0keys rr3z!prepare_predicate..selects:  88C==,JJJ  r$z@-='z@-!='c3PK|D]}|kr|V dSrri)r r/r0rjvalues rr3z!prepare_predicate..selects?  88C==E))JJJ  r$c3XK|D]#}|x} |kr|V$dSrri)r r/r0 attr_valuerjrls rselect_negatedz)prepare_predicate..select_negatedsI  "&((3--/J<uATATJJJ  r$z!=z\-?\d+$c3HK|D]}||VdSr)find)r r/r0rs rr3z!prepare_predicate..selects:  99S>>-JJJ  r$z.='z.!='z-='z-!='c3K|D]K}|D]3}d|kr|Vn4LdSNr)r joinitertextr r/r0r"rrls rr3z!prepare_predicate..selectsn"""D!\\#..""771::<<00E99"&JJJ!E:""r$c3K|D]K}|D]3}d|kr|Vn4LdSrs)iterfindrtrurvs rroz)prepare_predicate..select_negated"sn"""D!]]3//""771::<<00E99"&JJJ!E:""r$c3tK|D]1}d|kr|V2dSrsrtrur r/r0rls rr3z!prepare_predicate..select)I"##Dwwt}}//588" ##r$c3tK|D]1}d|kr|V2dSrsrzr{s rroz)prepare_predicate..select_negated-r|r$z-()z-()-zXPath position >= 1 expectedlastzunsupported functionr6zunsupported expressionr(z)XPath offset from last() must be negativec3Kt|}|D]W} ||}t||j}||ur|VA#tt f$rYTwxYwdSr)r#listr r IndexErrorr)r r/rr0rbelemsindexs rr3z!prepare_predicate..selectEs'00J  '-F !9!9::EU|t++" "H-D  s=AA*)A*zinvalid predicate)r]appendrtrematchintr ValueError) rNr signature predicater3rorrjrrls @@@@rprepare_predicatersII # DFFEE    FF  8s??  H    8 (a! --q!B$'EqS)))q""" # ""IDl      Fi722l"             "&!2!2~~>CYq\ B Bl      EY&00 %  9#6#6HZ166$7l"   # " " " " " "  " " " " " " " # # # # # # # # # #"&!2!2~~>C9--f1D1D    ! %%)Eqyy!"@AAA|v%%!"8999F""@ ! --1EE!@@@%&>???@2::%&QRRR      ) * **s  $$6HH))rrX.z..z//[ceZdZdZdZdS)_SelectorContextNc||_dSr)r)selfrs r__init__z_SelectorContext.__init__`s  r$)__name__ __module__ __qualname__rrr*r$rrr^s(Jr$rcZ|dddkr|dz}|f}|r1|tt|z } t|}n.#t$r t tdkrt|dddkrtdtt||j } |}n#t$rYYdSwxYwg} | t|d||n#t$rtddwxYw |}|ddkr |}n#t$rYnwxYw|t|<YnwxYw|g}t|}|D]} | ||}|S) Nr:/rXdrz#cannot use absolute path on elementrz invalid path)tuplesorteditems_cacherrAclearrrr__next__r]ropsr) r0pathr cache_keyselectorrNrr/r r3s rrxrxhs  BCCyCczI7U6*"2"2"4"455666 %)$ %%% v;;   LLNNN 8s??CDD DOD*5566? DFFEE    FFF   <E!H dE : :;;;;  < < <!.11t; < 8s?? DFFE      %y-%0VFt$$G))(( Mss AA;F C! F! C0+F/C00F7/D'&F'EF E'&F' E41F3E44FFc@tt|||dSr)rNrxr0rrs rrqrqs tZ00$ 7 77r$c>tt|||Sr)rrxrs rr r s tZ00 1 11r$c tt|||}|jdS|jS#t$r|cYSwxYwrs)rNrxtextr])r0rdefaultrs rfindtextrsYHT44455 9 2y s%00 ??r)NN)rcompiler rr#r,rCrOrSrVr^rcrrrrrxrqr rr*r$rrstv RZ    ----0000&&&R&  >   n+n+n+b        ''''X8888 2222 r$PK!^Tkaa'__pycache__/ElementTree.cpython-311.pycnu[ !A?h"dZgdZdZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl m Z Gdde Zd ZGd d Zifd ZdDd ZdDdZeZGddZGddZe jdZdDdZdZhdZdZdZeeedZdZdddddd d!d"Z e e_ d#Z!d$Z"d%Z#d&Z$dEddd'd(d)Z%Gd*d+ej&Z'dEddd'd(d,Z(d-Z)dFd/Z*dDd0Z+dEd1Z,Gd2d3Z-dDd4Z.dDd5Z/e.Z0dDd6Z1Gd7d8Z2Gd9d:Z3dDddd;d<Z4ej5d=ej6j7Z8Gd>d?Z9d@Z:dAZ; eZZ>e>eedS#e?$rYdSwxYw)GaLightweight XML support for Python. XML is an inherently hierarchical data format, and the most natural way to represent it is with a tree. This module has two classes for this purpose: 1. ElementTree represents the whole XML document as a tree and 2. Element represents a single node in this tree. Interactions with the whole document (reading and writing to/from files) are usually done on the ElementTree level. Interactions with a single XML element and its sub-elements are done on the Element level. Element is a flexible container object designed to store hierarchical data structures in memory. It can be described as a cross between a list and a dictionary. Each Element has a number of properties associated with it: 'tag' - a string containing the element's name. 'attributes' - a Python dictionary storing the element's attributes. 'text' - a string containing the element's text content. 'tail' - an optional string containing text after the element's end tag. And a number of child elements stored in a Python sequence. To create an element instance, use the Element constructor, or the SubElement factory function. You can also use the ElementTree class to wrap an element structure and convert it to and from XML. )CommentdumpElement ElementTree fromstringfromstringlistindent iselement iterparseparse ParseErrorPIProcessingInstructionQName SubElementtostring tostringlist TreeBuilderVERSIONXMLXMLID XMLParser XMLPullParserregister_namespace canonicalizeC14NWriterTargetz1.3.0N) ElementPathceZdZdZdS)r zAn error when parsing an XML document. In addition to its exception value, a ParseError contains two extra attributes: 'code' - the specific exception code 'position' - the line and column of the error N)__name__ __module__ __qualname____doc__B/opt/alt/python-internal/lib64/python3.11/xml/etree/ElementTree.pyr r ks Dr%r c"t|dS)z2Return True if *element* appears to be an Element.tag)hasattr)elements r&r r ys 7E " ""r%ceZdZdZdZ dZ dZ dZ ifdZdZ dZ dZ dZ dZ d Zd Zd Zd Zd ZdZdZdZdZddZddZddZddZdZddZdZdZdZddZ dZ!dS)rahAn XML element. This class is the reference implementation of the Element interface. An element's length is its number of subelements. That means if you want to check if an element is truly empty, you should check BOTH its length AND its text attribute. The element tag, attribute names, and attribute values can be either bytes or strings. *tag* is the element name. *attrib* is an optional dictionary containing element attributes. *extra* are additional element attributes given as keyword arguments. Example form: text...tail Nc t|tstd|jj||_i|||_g|_dS)Nzattrib must be dict, not ) isinstancedict TypeError __class__r r(attrib _children)selfr(r1extras r&__init__zElement.__init__s\&$'' -) )),-- -))5) r%cJd|jj|jt|fzS)Nz<%s %r at %#x>)r0r r(idr3s r&__repr__zElement.__repr__s!4>#:DHbhh"OOOr%c.|||S)zCreate a new element with the same type. *tag* is a string containing the element name. *attrib* is a dictionary containing the element attributes. Do not call this method, use the SubElement factory function instead. )r0)r3r(r1s r& makeelementzElement.makeelements~~c6***r%c^tjdt|S)zReturn copy of current element. This creates a shallow copy. Subelements will be shared with the original tree. z7elem.copy() is deprecated. Use copy.copy(elem) instead.)warningswarnDeprecationWarning__copy__r8s r&copyz Element.copys.  E    }}r%c||j|j}|j|_|j|_||dd<|SN)r;r(r1texttail)r3elems r&r@zElement.__copy__s?$+66I I QQQ r%c*t|jSrC)lenr2r8s r&__len__zElement.__len__s4>"""r%cjtjdtdt|jdkS)NzyThe behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. stacklevelr)r=r> FutureWarningrHr2r8s r&__bool__zElement.__bool__s=  K a     4>""a''r%c|j|SrCr2r3indexs r& __getitem__zElement.__getitem__s~e$$r%ct|tr|D]}||n||||j|<dSrC)r-slice_assert_is_elementr2)r3rSr*elts r& __setitem__zElement.__setitem__sg eU # # - - -'',,,, -  # #G , , , 'ur%c|j|=dSrCrQrRs r& __delitem__zElement.__delitem__s N5 ! ! !r%cd|||j|dS)aAdd *subelement* to the end of this element. The new element will appear in document order after the last existing subelement (or directly after the text, if it's the first subelement), but before the end tag for this element. NrWr2appendr3 subelements r&r^zElement.appends4  +++ j)))))r%cn|D]1}|||j|2dS)zkAppend subelements from a sequence. *elements* is a sequence with zero or more elements. Nr])r3elementsr*s r&extendzElement.extendsJ   + +G  # #G , , , N ! !' * * * * + +r%cf|||j||dS)z(Insert *subelement* at position *index*.N)rWr2insert)r3rSr`s r&rezElement.inserts4  +++ eZ00000r%cxt|ts$tdt|jzdS)Nzexpected an Element, not %s)r- _Element_Pyr/typer )r3es r&rWzElement._assert_is_elements@![)) N9DGG)r0r rDr8s r&r9zQName.__repr__s  N333TYYY??r%c*t|jSrC)hashrDr8s r&__hash__zQName.__hash__sDIr%cbt|tr|j|jkS|j|kSrCr-rrDr3others r&__le__z QName.__le__0 eU # # +9 * *yE!!r%cbt|tr|j|jkS|j|kSrCrrs r&__lt__z QName.__lt__0 eU # # *9uz) )y5  r%cbt|tr|j|jkS|j|kSrCrrs r&__ge__z QName.__ge__rr%cbt|tr|j|jkS|j|kSrCrrs r&__gt__z QName.__gt__rr%cbt|tr|j|jkS|j|kSrCrrs r&__eq__z QName.__eq__rr%rC) r r!r"r#r5rr9rrrrrrr$r%r&rrs      @@@"""!!!"""!!!"""""r%rcreZdZdZddZdZdZddZddZddZ dd Z dd Z dd Z dd d dZ dZdS)ra%An XML element hierarchy. This class also provides support for serialization to and from standard XML. *element* is an optional root element node, *file* is an optional file handle or file name of an XML file whose contents will be used to initialize the tree with. NcF||_|r||dSdSrC)_rootr )r3r*files r&r5zElementTree.__init__s3   JJt       r%c|jS)z!Return root element of this tree.rr8s r&getrootzElementTree.getroots zr%c||_dS)zReplace root element of this tree. This will discard the current contents of the tree and replace it with the given element. Use with care! Nr)r3r*s r&_setrootzElementTree._setroot#s r%cd}t|dst|d}d} |Vt}t|dr8|||_|j|r|SS |d}|sn||.||_|j|r|SS#|r|wwxYw)a=Load external XML document into element tree. *source* is a file name or file object, *parser* is an optional parser instance that defaults to XMLParser. ParseError is raised if the parser fails to parse the document. Returns the root element of the given source document. FreadrbTN _parse_wholei)r)openrrrcloserfeed)r3sourceparser close_sourcedatas r&r zElementTree.parse-s vv&& &$''FL ~"6>22& "(!4!4V!AC$$C=c6|j|S)zCreate and return tree iterator for the root element. The iterator loops over all elements in this tree, in document order. *tag* is a string with the tag name to iterate over (default is to return all elements). )rrr3r(s r&rzElementTree.iterRszs###r%c|dddkr$d|z}tjd|ztd|j||S)a\Find first matching element by tag name or path. Same as getroot().find(path), which is Element.find() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found. Nr/.This search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rrKrL)r=r>rNrrmrns r&rmzElementTree.find^sc 8s??:D M-/34!      ztZ000r%c|dddkr$d|z}tjd|ztd|j|||S)aeFind first matching element by tag name or path. Same as getroot().findtext(path), which is Element.findtext() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found. NrrrrrKrL)r=r>rNrrrrss r&rrzElementTree.findtexttsg 8s??:D M-/34!      z""4*===r%c|dddkr$d|z}tjd|ztd|j||S)aaFind all matching subelements by tag name or path. Same as getroot().findall(path), which is Element.findall(). *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return list containing all matching elements in document order. NrrrrrKrL)r=r>rNrrvrns r&rvzElementTree.findallse 8s??:D M-/34!      z!!$ 333r%c|dddkr$d|z}tjd|ztd|j||S)agFind all matching subelements by tag name or path. Same as getroot().iterfind(path), which is element.iterfind() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return an iterable yielding all matching elements in document order. NrrrrrKrL)r=r>rNrrxrns r&rxzElementTree.iterfindse 8s??:D M-/34!      z""4444r%Tshort_empty_elementsc|sd}n|tvrtd|z|s |dkrd}nd}t||5\}}|dkrA|s0|=|dkr%|dvr|d |d |d krt ||jn:t |j|\} } t|} | ||j| | | ddddS#1swxYwYdS) aWrite element tree to a file as XML. Arguments: *file_or_filename* -- file name or a file object opened for writing *encoding* -- the output encoding (default: US-ASCII) *xml_declaration* -- bool indicating if an XML declaration should be added to the output. If None, an XML declaration is added if encoding IS NOT either of: US-ASCII, UTF-8, or Unicode *default_namespace* -- sets the default XML namespace (for "xmlns") *method* -- either "xml" (default), "html, "text", or "c14n" *short_empty_elements* -- controls the formatting of elements that contain no content. If True (default) they are emitted as a single self-closed tag, otherwise they are emitted as a pair of start/end tags xmlzunknown method %rc14nutf-8us-asciiNunicode)rrz rDr) _serialize ValueError _get_writerlower_serialize_textr _namespaces) r3file_or_filenameencodingxml_declarationdefault_namespacemethodrwritedeclared_encodingqnamesrp serializes r&rzElementTree.writes: ;FF : % %069:: : &"% )8 4 4 E8R@QO$,^^%%22&,,..6KKK%%%()))tz2222%0=N%O%O" &v.  %VZ/CEEEE E E E E E E E E E E E E E E E E E EsB!C,,C03C0c0||dS)Nr)r)r)r3rs r& write_c14nzElementTree.write_c14nszz$vz...r%rrC)NNNN)r r!r"r#r5rrr rrmrrrvrxrrr$r%r&rrs   ####J $ $ $ $1111,>>>>,4444,5555." $ 3E $( 3E3E3E3E3Ej/////r%rc#xK |j}|dkr|t|ddpdfVdStj5}t |t jr|}nt |t jr/t j |}| |j nLt j}d|_ ||_ |j |_ |j|_n#t$rYnwxYwt j||dd}| |j |j|fVddddS#1swxYwYdS#t$rV|dkrd}t#|d|d 5}|j|fVdddYdS#1swxYwYYdSwxYw) NrrrcdSNTr$r$r%r&z_get_writer..sDr%xmlcharrefreplace )rerrorsnewlinew)rr)rrgetattr contextlib ExitStackr-ioBufferedIOBase RawIOBaseBufferedWritercallbackdetachwritableseekabletellAttributeError TextIOWrapperr)rrrstackrs r&rrs-+ & >>  y ( (!1:tDDOO O O O O O%'' +5.0ABB+DD 0",??,-=>>DNN4;////,..D$0LDM!&DJ)9(A $4$9 )'19/B04666 t{+++j(****9 + + + + + + + + + + + + + + + + + + ''' >>  y ( (H "C(,... '15*h& & & & ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 'smEB E C21E 2 C?<E >C??AE  EE7F9 F* F9*F. .F91F. 2F98F9cddiird<fd}|D])}|j}t|tr|jvr||jnHt|t r|vr ||n#|!|t ur|turt|| D]^\}}t|tr|j}|vr ||t|tr|jvr||j_|j}t|tr|jvr||j+fS)Nc |dddkr|dddd\}}|}|9t|}|dtz}|dkr||<|r |d||<dS||<dSrt d||<dS#t $rt |YdSwxYw)Nrrrzns%dr:z.add_qname/s .RaRyC 9++C33S#,,>+//44F~!'#j//!9*0 3(/5vvss$;F5MMM$'F5MMM$$3!&u  . . . &u - - - - - - .sB B/B/B//C  C ) rr(r-rrDrrr rr) rFrrr(r}rrDrprs ` @@r&rr$sD\FJ+(* $%.......8 !!h c5 ! ! ,xv%% #(### S ! ! ,&   # _G!3!32 &s + + +**,, & &JC#u%% h&   #%'' &EJf,D,D %*%%%y dE " " !ty'>'> Idi : r%c |j}|j}|tur|d|zn|tur|d|zn||}|5|r|t ||D]}t |||d|na|d|zt |} | s|r|rPt|dD]+\} } | rd| z} |d| d t| d ,| D]k\} } t| tr| j} t| tr|| j} nt| } |d || d | d l|st|s|sP|d |r|t ||D]}t |||d||d |zd zn |d|j r|t |j dSdS)N rrc|dSNrr$xs r&rz _serialize_xml..w QqTr%r}r xmlns=""rr)r(rDrr _escape_cdata_serialize_xmllistrsorted_escape_attribr-rrHrE) rrFrrprkwargsr(rDrirvks r&rras (C 9D g~~ kD !!!! % % % hoSk ; +mD))*** J Jua4HJJJJJ J E#)   &&E 9  9 &z'7'7'9'9+9>!;!;!;1( #aAAA*1----"99DAq!!U++#F!!U++."16N*1--EE&)))QQQ78888 s4yy (< c /E---...NNA"5!VT8LNNNNNdSj3&''''e  y( mDI&&'''''((r%>brhrcolimgwbrareabaselinkmetaembedframeinputparamtrackrisindexbasefontc j|j}|j}|tur|dt|zn|tur|dt|zn||}|3|r|t||D]}t |||dnu|d|zt |}|s|r|rPt|dD]+\} } | rd| z} |d| dt| d ,|D]k\} } t| tr| j} t| tr|| j} nt| } |d || d| d l|d | } |r0| d ks| d kr ||n|t||D]}t |||d| tvr|d|zd z|jr|t|jdSdS)Nr r rc|dSr r$rs r&rz!_serialize_html..rr%rrrrrrrscriptstyler)r(rDrrr_serialize_htmlrrrrr-r_escape_attrib_htmlr HTML_EMPTYrE) rrFrrprr(rDrirrrltags r&r2r2s (C 9D g~~ kM$///0000 % % % ht,,,----Sk ; +mD))*** 8 8q&$7777 8 E#)   &&E 9  9 &z'7'7'9'9+9>!;!;!;1( #aAAA*1----"99DAq!!U++#F!!U++3"16N/22EE&)))QQQ78888 E#JJJ99;;D /8##twE$KKKKE---... 8 8q&$7777:%%dSj3&''' y( mDI&&'''''((r%c||D] }|||jr||jdSdSrC)rrE)rrFparts r&rrsT  d  y dir%)rhtmlrDctjd|rtdttD]\}}||ks||krt|=|t|<dS)atRegister a namespace prefix. The registry is global, and any existing mapping for either the given prefix or the namespace URI will be removed. *prefix* is the namespace prefix, *uri* is a namespace uri. Tags and attributes in this namespace will be serialized with prefix if possible. ValueError is raised if prefix is reserved or is invalid. zns\d+$z'Prefix format reserved for internal useN)rematchrrrr)rrrrs r&rrsy x 6""DBCCC^))++,,""1 88qF{{q! N3r%rr8rdfwsdlxsxsidc)$http://www.w3.org/XML/1998/namespacezhttp://www.w3.org/1999/xhtmlz+http://www.w3.org/1999/02/22-rdf-syntax-ns#z http://schemas.xmlsoap.org/wsdl/z http://www.w3.org/2001/XMLSchemaz)http://www.w3.org/2001/XMLSchema-instancez http://purl.org/dc/elements/1.1/cRtd|dt|jd)Nzcannot serialize z (type ))r/rhr rs r&rrs1 )+/44d1D1D1DE   r%c d|vr|dd}d|vr|dd}d|vr|dd}|S#ttf$rt|YdSwxYw)N&&r<r>replacer/rrrs r&rrs ) $;;<<W--D $;;<<V,,D $;;<<V,,D ~ &)))"4(((((()AA A65A6c d|vr|dd}d|vr|dd}d|vr|dd}d|vr|dd}d |vr|d d }d |vr|d d }d |vr|d d}|S#ttf$rt|YdSwxYw)NrErFrrGrrHr" z rz  z rIrs r&rrs ) $;;<<W--D $;;<<V,,D $;;<<V,,D 4<<<<h//D 4<<<<g..D 4<<<<g..D 4<<<<g..D ~ &)))"4(((((()sB7B:: CCc d|vr|dd}d|vr|dd}d|vr|dd}|S#ttf$rt|YdSwxYw)NrErFrrHrrMrIrs r&r3r3+s ) $;;<<W--D $;;<<V,,D 4<<<<h//D ~ &)))"4(((((()rKT)rrrc|dkrtjntj}t||||||||S)a Generate string representation of XML element. All subelements are included. If encoding is "unicode", a string is returned. Otherwise a bytestring is returned. *element* is an Element instance, *encoding* is an optional output encoding defaulting to US-ASCII, *method* is an optional output which can be one of "xml" (default), "html", "text" or "c14n", *default_namespace* sets the default XML namespace (for "xmlns"). Returns an (optionally) encoded string containing the XML data. rrrrr)rStringIOBytesIOrrgetvalue)r*rrrrrstreams r&rr:sm ')33R[]]]Fvx/>1B&,4H JJJ ??  r%c0eZdZdZdZdZdZdZdZdS)_ListDataStreamz7An auxiliary stream accumulating into a list reference.c||_dSrC)lst)r3rZs r&r5z_ListDataStream.__init__Ts r%cdSrr$r8s r&rz_ListDataStream.writableWtr%cdSrr$r8s r&rz_ListDataStream.seekableZr\r%c:|j|dSrC)rZr^)r3bs r&rz_ListDataStream.write]s r%c*t|jSrC)rHrZr8s r&rz_ListDataStream.tell`s48}}r%N) r r!r"r#r5rrrrr$r%r&rXrXRseAAr%rXcxg}t|}t||||||||S)NrR)rXrr)r*rrrrrrZrVs r&rrcsU C S ! !Fvx/>1B&,4H JJJ Jr%c t|tst|}|tjd|j}|r |ddkr!tjddSdS)a#Write element tree or element structure to sys.stdout. This function should be used for debugging only. *elem* is either an ElementTree, or a single Element. The exact output format is implementation dependent. In this version, it's written as an ordinary XML file. r)rrN)r-rrsysstdoutrrE)rFrEs r&rrps dK ( (!4  JJszIJ... <<>> D 48t## $#r% ct|tr|}|dkrtd|t |sdSd|zzgfd|ddS)a&Indent an XML document by inserting newlines and indentation space after elements. *tree* is the ElementTree or Element to modify. The (root) element itself will not be changed, but the tail text of all elements in its subtree will be adapted. *space* is the whitespace to insert for each indentation level, two space characters by default. *level* is the initial indentation level. Setting this to a higher value than 0 can be used for indenting subtrees that are more deeply nested inside of a document. rz,Initial indentation level must be >= 0, got Nrc|dz} |}n0#t$r#|z}|YnwxYw|jr|js||_|D]D}t |r |||jr|js||_E|js||_dSdSr ) IndexErrorr^rDstriprHrE)rFlevel child_levelchild_indentationchild_indent_children indentationsspaces r&roz indent.._indent_childrensai  3 ,[ 9   3 3 3 ,U 3e ;     1 2 2 2 2 2 3y *  1 1 *)DI / /E5zz 5   444: /UZ%5%5%7%7 /. z!! -%e,EJJJ - -s *>>)r-rrrrH)treerqrkrorps ` @@r&rrs$ $$||~~ qyyOOOPPP t9955=()L-------,T1r%cNt}||||S)zParse XML document into element tree. *source* is a filename or file object containing XML data, *parser* is an optional parser instance defaulting to XMLParser. Return an ElementTree instance. )rr )rrrrs r&r r s& ==DJJvv Kr%ct||tdstddndfdGfddtjj}|}d |_tj||S) aJIncrementally parse XML document into ElementTree. This class also reports what's going on to the user based on the *events* it is initialized with. The supported events are the strings "start", "end", "start-ns" and "end-ns" (the "ns" events are used to get detailed namespace information). If *events* is omitted, only "end" events are reported. *source* is a filename or file object containing XML data, *events* is a list of events to report back, *parser* is an optional parser instance. Returns an iterator providing (event, elem) pairs. )events_parserrrTFc3K Ed{V|d}|sn|H}Ed{V}|||_r|dSdS#r|wwxYw)NTi@) read_eventsrr_close_and_return_rootrootr)rrrzitr pullparserwrs r&iteratorziterparse..iterators  &%11333333333{{9--%%%  &4466D!--// / / / / / / /B~    |   s B B))Cc<eZdZjZfdZdS)$iterparse..IterParseIteratorc8rdSdSrC)r)r3rrs r&__del__z,iterparse..IterParseIterator.__del__s&    r%N)r r!r"__next__r)rr~rsr&IterParseIteratorrsE8F##,        r%rN) rr)r collectionsabcIteratorrzweakrefref) rrurrr{rr~r|r}s ` @@@@r&r r s"ff===J 66 " "fd##  $KO4    BBG RB Ir%c:eZdZd dddZdZdZdZdZdZdS) rN)rvctj|_|ptt |_|d}|j|j|dS)Nr)end)rdeque _events_queuerrrv _setevents)r3rurvs r&r5zXMLPullParser.__init__s[ ).00A);=="A"A"A >F  2F;;;;;r%c|jtd|rO |j|dS#t$r%}|j|Yd}~dSd}~wwxYwdS)Feed encoded data to parser.Nz!feed() called after end of stream)rvrr SyntaxErrorrr^)r3rexcs r&rzXMLPullParser.feed s < @AA A  / / !!$''''' / / /"))#......... / / /s6 A%A  A%cF|j}d|_|SrC)rvr)r3rzs r&ryz$XMLPullParser._close_and_return_roots!|!!##  r%c.|dS)zFinish feeding data to parser. Unlike XMLParser, does not return the root element. Use read_events() to consume elements from XMLPullParser. N)ryr8s r&rzXMLPullParser.closes ##%%%%%r%c#K|j}|r3|}t|tr||V|1dSdS)zReturn an iterator over currently available (event, elem) pairs. Events are consumed from the internal event queue as they are retrieved from the iterator. N)rpopleftr- Exception)r3ruevents r&rxzXMLPullParser.read_events%se # NN$$E%++        r%cd|jtd|jdS)Nz"flush() called after end of stream)rvrflushr8s r&rzXMLPullParser.flush3s3 < ABB B r%rC) r r!r"r5rryrrxrr$r%r&rrs >r%c|stt}|||}i}|D]}|d}|r|||<||fS)aParse XML document from string constant for its IDs. *text* is a string containing XML data, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an (Element, dict) tuple, in which the dict maps element id:s to elements. rr7)rrrrrr|)rDrrridsrFr7s r&rrJs 1+--000 KK <<>>D C  XXd^^  CG 9r%c|stt}|D]}|||S)zParse XML document from sequence of string fragments. *sequence* is a list of other sequence, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an Element instance. rr)sequencerrDs r&rrbsR 1+--000 D <<>>r%cXeZdZdZdddddddZdZdZdZd Zd Z d Z dd Z d Z dS)ra8Generic element structure builder. This builder converts a sequence of start, data, and end method calls to a well-formed element structure. You can use this class to build an element structure using a custom XML parser, or a parser for some other XML-like format. *element_factory* is an optional element factory which is called to create new Element instances, as necessary. *comment_factory* is a factory to create comments to be used instead of the standard factory. If *insert_comments* is false (the default), comments will not be inserted into the tree. *pi_factory* is a factory to create processing instructions to be used instead of the standard factory. If *insert_pis* is false (the default), processing instructions will not be inserted into the tree. NF)comment_factory pi_factoryinsert_comments insert_piscg|_g|_d|_d|_d|_|t }||_||_|t}||_ ||_ |t}||_ dSrC) _data_elem_lastr_tailr_comment_factoryrr _pi_factoryrr_factory)r3element_factoryrrrrs r&r5zTreeBuilder.__init__sr      "%O /.  .J%$  "%O' r%cvt|jdks Jd|j Jd|jS)z;Flush builder buffers and return toplevel document Element.rzmissing end tagsNzmissing toplevel element)rHrrr8s r&rzTreeBuilder.closesC4:!###%7###z%%'A%%%zr%c|jrv|jfd|j}|jr#|jj Jd||j_n"|jj Jd||j_g|_dSdS)Nrzinternal error (tail)zinternal error (text))rrjoinrrErDr3rDs r&_flushzTreeBuilder._flushs : z%wwtz**:+:?224K222&*DJOO:?224K222&*DJODJJJ  r%c:|j|dS)zAdd text to current element.N)rr^r3rs r&rzTreeBuilder.datas $r%c||||x|_}|jr!|jd|n|j||_|j|d|_|S)zOpen new element and return it. *tag* is the element name, *attrs* is a dict containing element attributes. rcNr)rrrrr^rr)r3r(attrsrFs r&startzTreeBuilder.starts  MM#u555 T :  JrN ! !$ ' ' ' ' Z DJ $  r%c||j|_|jj|ksJd|jjd|dd|_|jS)zOClose and return current Element. *tag* is the element name. zend tag mismatch (expected z, got rCr)rrpoprr(rrs r&rzTreeBuilder.endsk Z^^%% z~$$$$:>>>333(%$$ zr%cD||j|j|S)z`Create a comment using the comment_factory. *text* is the text of the comment. )_handle_singlerrrs r&commentzTreeBuilder.comments) ""  !4#7?? ?r%cF||j|j||S)zCreate a processing instruction using the pi_factory. *target* is the target name of the processing instruction. *text* is the data of the processing instruction, or ''. )rrr)r3rrDs r&pizTreeBuilder.pis* ""  dovt== =r%c||}|rI|||_|jr |jd|d|_|S)Nrcr)rrrr^r)r3factoryreargsrFs r&rzTreeBuilder._handle_singlesYw~   KKMMMDJz , 2%%d+++DJ r%rC) r r!r"r#r5rrrrrrrrr$r%r&rrts&(!%$!&5((((((      "   ???====r%rcbeZdZdZddddZdZdZdZdZd Z d Z d Z d Z d Z dZdZdS)raaElement structure builder for XML source data based on the expat parser. *target* is an optional target object which defaults to an instance of the standard TreeBuilder class, *encoding* is an optional encoding string which if given, overrides the encoding specified in the XML file: http://www.iana.org/assignments/character-sets N)rrc@ ddlm}n3#t$r& ddl}n#t$rtdwxYwYnwxYw||d}|t }|x|_|_|x|_|_ |j |_ i|_ |j |_t|dr |j|_t|dr |j|_t|dr |j|_t|dr |j|_t|d r |j|_t|d r |j|_t|d r |j|_d |_d |_d|_ i|_! d |j"z|_#dS#tH$rYdSwxYw)Nrexpatz7No module named expat; use SimpleXMLTreeBuilder insteadrrrstart_nsend_nsrrrrzExpat %d.%d.%d)% xml.parsersr ImportErrorpyexpat ParserCreaterrrvr_targeterror_error_names_defaultDefaultHandlerExpandr)_startStartElementHandler_endEndElementHandler _start_nsStartNamespaceDeclHandler_end_nsEndNamespaceDeclHandlerrCharacterDataHandlerrCommentHandlerrProcessingInstructionHandler buffer_textordered_attributes_doctypeentity version_infoversionr)r3rrrrs r&r5zXMLParser.__init__s  ) ) ) ) ) ) )    '''''   !M (' ##Hc22 > ]]F%++ dl%++ dlk  &*m# 67 # # 5)-F & 65 ! ! 1'+yF $ 6: & & >/3~F , 68 $ $ :-1\F * 66 " " 6*0+F ' 69 % % 3$*NF ! 64  <28)F /$%!   +e.@@DLLL    DD s. 99399>F FFc|j}|j}|D]}|dkrd|_|||jfd}||_#|dkr|||jfd}||_=|dkr0t|jdr |||j fd}n||fd }||_ s|d kr0t|jd r |||j fd }n||fd }||_ |dkr|||fd}||_ |dkr|||fd}||_td|zdS)Nrrc4|||||fdSrCr$)r( attrib_inrr^rs r&handlerz%XMLParser._setevents..handler1s)FE55i#8#89:::::r%rc2||||fdSrCr$)r(rr^rs r&rz%XMLParser._setevents..handler6s%FE33s88,-----r%zstart-nsrc4|||||fdSrCr$)rrrr^rs r&rz%XMLParser._setevents..handler=s)xx'<'<=>>>>>r%c,|||pd|pdffdSNrr$)rrrr^s r&rz%XMLParser._setevents..handlerAs* "ciR'@ABBBBBr%zend-nsrc2||||fdSrCr$)rrr^rs r&rz%XMLParser._setevents..handlerGs%vvf~~677777r%c ||dfdSrCr$)rrr^s r&rz%XMLParser._setevents..handlerKst}-----r%rcP|||j|fdSrC)rr)rDrr^r3s r&rz%XMLParser._setevents..handlerOs-FE4;#6#6t#<#<=>>>>>r%rcR|||j||fdSrC)rr) pi_targetrrr^r3s r&rz%XMLParser._setevents..handlerSs-FE4;>>)T#B#BCDDDDDr%zunknown event %r)rvr^rrrrrr)rrrrrrrr)r3 events_queueevents_to_reportrr^ event_namers r&rzXMLParser._setevents%s$** B* BJW$$,-)2fCCCC3:00x''4;11..8'+|88888/9....18..y(((26????(/%%t##3=f!%EEEE7>33 !3j!@AAAU* B* Br%cbt|}|j|_|j|jf|_|rC)r codelinenooffsetposition)r3rerrs r& _raiseerrorzXMLParser._raiseerrorZs-:|U\1  r%cn |j|}n%#t$r|}d|vrd|z}||j|<YnwxYw|S)Nrr)rKeyError)r3r}names r&_fixnamezXMLParser._fixname`s` $;s#DD $ $ $Dd{{Tz#DK     $  s 22c@|j|pd|pdSr)rrr3rrs r&rzXMLParser._start_nsks"{##FLb#)<<tdt|dD]}||dz||||< |j||S)NrrKr)rrangerHrr)r3r( attr_listfixnamer1is r&rzXMLParser._startqs-gcll  ?1c)nna00 ? ?09!A#wwy|,,--{  f---r%c\|j||SrC)rrrrs r&rzXMLParser._end}s"{t}}S11222r%c|dd}|dkr |jj}n#t$rYdSwxYw ||j|dddS#t$raddlm}|d||jj |jj fz}d|_ |jj |_ |jj |_ |wxYw|dkr|dd d kr g|_dS|j|d kr d|_dS|}|sdS|j|t#|j}|d kr|jd}|d kr|dkr|j\}}} } | r | dd} n|dkr|dkr|j\}}} d} ndSt%|jdr%|j|| | ddn*t%|drt)jdt,d|_dSdSdS)NrrErcrrz'undefined entity %s: line %d, column %d r z RuntimeWarning) r3rDr data_handlerrrnrhrpubidsystems r&rzXMLParser._defaults}bqb S== #{/ !      T[ad455555   ------kk=4;6K133 ![8 ![:   s]]tBQBx;66DMMM ] &}} $ ::< AAA A) B) A63B5A66B Bcp|j} |jd|jddn,#|j$r}||Yd}~nd}~wwxYw|j|dS#|j|wxYw)NFr%)rGetReparseDeferralEnabledSetReparseDeferralEnabledrrr)r3 was_enabledrs r&rzXMLParser.flushsk;;==  ? K 1 1% 8 8 8 K  c5 ) ) ) ){     Q          K 1 1+ > > > > >DK 1 1+ > > > >s/5AB A:A50B5A::BB5)r r!r"r#r5rrrrrrrrrrrr$r%r&rrs"&+++++Z3B3B3Bj   ===000 . . .3334%4%4%l   ***"?????r%r)out from_filec H||tdd}|tjx}}tt |jfi|}|*|||n|t|||| ndS)a3Convert XML to its C14N 2.0 serialised form. If *out* is provided, it must be a file or file-like object that receives the serialised canonical XML output (text, not bytes) through its ``.write()`` method. To write to a file, open it in text mode with encoding "utf-8". If *out* is not provided, this function returns the output as text string. Either *xml_data* (an XML string) or *from_file* (a file path or file-like object) must be provided as input. The configuration options are the same as for the ``C14NWriterTarget``. Nz:Either 'xml_data' or 'from_file' must be provided as inputr)r) rrrSrrrrrr rU)xml_datar!r"optionssiors r&rrsI-UVVV C {KMM!c .syDDGDD E E EF H    i'''' _3<<>>>$6r%z ^\w+:\w+$ceZdZdZdddddddddZefdZdZddZd Z d j fd Z d Z d Z ddZdZdZdZdS)ra Canonicalization writer target for the XMLParser. Serialises parse events to XML C14N 2.0. The *write* function is used for writing out the resulting data stream as text (not bytes). To write to a file, open it in text mode with encoding "utf-8" and pass its ``.write`` method. Configuration options: - *with_comments*: set to true to include comments - *strip_text*: set to true to strip whitespace before and after text content - *rewrite_prefixes*: set to true to replace namespace prefixes by "n{number}" - *qname_aware_tags*: a set of qname aware tag names in which prefixes should be replaced in text content - *qname_aware_attrs*: a set of qname aware attribute names in which prefixes should be replaced in text content - *exclude_attrs*: a set of attribute names that should not be serialised - *exclude_tags*: a set of tag names that should not be serialised FN) with_comments strip_textrewrite_prefixesqname_aware_tagsqname_aware_attrs exclude_attrs exclude_tagscX||_g|_||_||_|rt |nd|_|rt |nd|_||_|rt ||_nd|_|rt |j |_ nd|_ dgg|_ g|_ |s>|j tt|j gi|_dg|_d|_d|_d|_d|_dS)N)rArFr)_writer_with_comments _strip_textr_exclude_attrs _exclude_tags_rewrite_prefixes_qname_aware_tags intersection_find_qname_aware_attrs_declared_ns_stack _ns_stackr^rrr _prefix_map_preserve_space_pending_start _root_seen _root_done_ignored_depth) r3rr(r)r*r+r,r-r.s r&r5zC14NWriterTarget.__init__sE  +%4AKc-000t2>HS...D!1  *%()9%:%:D " "%)D "  0+./@+A+A+ND ( (+/D ( <$ #  @ N ! !$~';';'='=">"> ? ? ? b!!! %w"r%c#:K||D] }|r|Ed{V dSrCr$)r3ns_stack _reversedrps r&_iter_namespacesz!C14NWriterTarget._iter_namespaces7sJ#)H-- & &J &%%%%%%%% & &r%c|dd\}}||jD]\}}||kr d|d|cStd|d|d)NrrrrzPrefix z of QName "" is not declared in scope)splitrDr:r)r3 prefixed_namerrrps r&_resolve_prefix_namez%C14NWriterTarget._resolve_prefix_name<s$**322 ++DN;; * *FCF{{)C))4)))))_6__m___```r%c|4|dddkr|ddddnd|f\}}n|}t}||jD]4\}}||kr||vr|r|d|n|||fcS||5|jrd||jvr|j|}n!dt|jx}|j|<|jd||f|d|||fS|s d|vr|||fS||j D]=\}}||kr2|jd||f|r|d|n|||fcS>|s|||fStd|d ) Nrrrrrrrcz Namespace "rF) rrrDr9addr5r;rHr^r:r)r3rrr( prefixes_seenurs r&_qnamezC14NWriterTarget._qnameCs$ ;38!93C3CuQRRy''Q///"eHCC ..t/FGG & &IAvCxxF-77,2;&((3(((S#EEEE   f % % % %  ! /d&&&)#.1LS9I5J5J1L1LL)#.  #B ' . .V} = = =$$s$$c3. . !r..S= ..t~>> F FIAvCxx'+22C=AAA,2;&((3(((S#EEEE !S= FsFFFGGGr%cL|js|j|dSdSrC)r@rr^rs r&rzC14NWriterTarget.datahs3" $ J  d # # # # # $ $r%rcd||j}|jdd=|jr!|jds|}|j7|jdc}|_|rt |r|nd}|jg||R|dS|r+|jr&|t|dSdSdSNrc) rr2r<rjr=_looks_like_prefix_namerr>r0_escape_cdata_c14n)r3 _join_textrr qname_texts r&rzC14NWriterTarget._flushlsz$*%% JqqqM   D$8$< ::<D  F C/////r%cj"|r fd|D}|h|}i}|/|x}||<||jh|rf|}|rL|D]H} || } t | r/| x}|| <||Ind}nd}jfdt|dD} |r!d|D} | ng} |rlt|D]J\} }|| |vr||vr| ||d}| | \}} }| |r|n| |fK| d}j |r|dkn j d j }|d | |dz| r(|d d | D|d |*|t| ||dd_j gdS)Nc.i|]\}}|jv||Sr$)r3).0rrr3s r& z+C14NWriterTarget._start..s,TTTdaq@S7S7SQ7S7S7Sr%c(i|]}||Sr$r$)r\r parse_qnames r&r]z+C14NWriterTarget._start..s/444qKKNN444r%c.|ddS)Nrr)rG)rs r&rz)C14NWriterTarget._start..s!''#q//r%rc*g|]\}}|rd|znd|fS)zxmlns:xmlnsr$)r\rrs r& z+C14NWriterTarget._start..s@C'-9F""'3?r%rz+{http://www.w3.org/XML/1998/namespace}spacepreservercrrc@g|]\}}d|dt|dS)rrr)_escape_attrib_c14n)r\rrs r&rcz+C14NWriterTarget._start..s9TTT$!Q=q==$7$:$:===TTTr%rT)r3rrJrLr8rSrOrsortr^r|r<r0rrTr>r:)r3r(rrYrVrresolved_namesrqattrs attr_namer parsed_qnamesrrr attr_qnamerspace_behaviourrr_s` @r&rzC14NWriterTarget._starts6   *u *TTTTekkmmTTTE  !151J1J:1V1V VEN:. JJu     ' 3 311%88F !'**I!),E.u55*8<8Q8QRW8X8XXu 5 5))) * Fk 4444F 11535353444   #1I NN    I  Hu{{}}-- H H1%!v++!~:M:M%nQ&78;A-:1-=* Is  "B**A!FGGGG ))$QRR ##-< *Oz ) )%b) + + +   cM#&q))***  W E"''TT)TTTUU V V V c   ! E$]>*3M%Nq%QRR S S S b!!!!!r%c|jr|xjdzc_dS|jr||d||dd|jt|jdk|_|j |j dS)Nrrrr) r@rrr0rOr<rrHr?r9r:rs r&rzC14NWriterTarget.ends      1 $   F :  KKMMM /S))!,///000   """d233q8 ##%%% r%c0|jsdS|jrdS|jr|dn"|jr|jr||dt|d|js|ddSdS)Nrz)r1r@r?r0r>rrrTrs r&rzC14NWriterTarget.comments"  F    F ?  KK     _   KKMMM 8-d33888999  KK       r%c4|jrdS|jr|dn"|jr|jr|||rd|dt |dnd|d|js|ddSdS)Nrz)r@r?r0r>rrrT)r3rrs r&rzC14NWriterTarget.pis    F ?  KK     _   KKMMM :> S 6 6 6,T22 6 6 6 6OOOO U U U  KK       r%rC)r r!r"r#r5reversedrDrJrOrrrrrrrrrr$r%r&rrs, %"&$#$# # # # # J4<&&&& aaa#H#H#H#HJ$$$!# 2 2 2 2111000"C"C"C"C"J           r%rc& d|vr|dd}d|vr|dd}d|vr|dd}d|vr|dd}|S#ttf$rt|YdSwxYw) NrErFrrGrrHrN rIrs r&rTrTs) $;;<<W--D $;;<<V,,D $;;<<V,,D 4<<<<g..D ~ &)))"4(((((()sA)A,, BBc d|vr|dd}d|vr|dd}d|vr|dd}d|vr|dd}d |vr|d d }d |vr|d d }|S#ttf$rt|YdSwxYw) NrErFrrGrrMrOz rz rNrsrIrs r&rfrfs) $;;<<W--D $;;<<V,,D $;;<<X..D 4<<<<g..D 4<<<<g..D 4<<<<g..D ~ &)))"4(((((()sBB CC)r)_set_factoriesrCr)rfr)@r#__all__rrdr:r=rrcollections.abcrrrrrr r rrrrr rrcontextmanagerrrrr4r2rrrrrrrr3rrrXrrrr r rrrrrrrrcompileUNICODEr;rSrrTrfrg _elementtreerurr$r%r&r|s'!!P   (             ### jjjjjjjjZ $&$     +"+"+"+"+"+"+"+"`_/_/_/_/_/_/_/_/H /+/+/+b;;;;z0(0(0(d 0(0(0(d    !!!*-2$*38(.(,16(,  %3!   ))) )))8 ) ) )!T"&0b'" !%&*     &////l    5555p77777777t",     $vvvvvvvvth?h?h?h?h?h?h?h?Z7tt77777<%"*\2:>>DD)))&))). 3K++++++N7122222   DD s E77F?FPK!}_}_-__pycache__/ElementTree.cpython-311.opt-1.pycnu[ !A?h"dZgdZdZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl m Z Gdde Zd ZGd d Zifd ZdDd ZdDdZeZGddZGddZe jdZdDdZdZhdZdZdZeeedZdZdddddd d!d"Z e e_ d#Z!d$Z"d%Z#d&Z$dEddd'd(d)Z%Gd*d+ej&Z'dEddd'd(d,Z(d-Z)dFd/Z*dDd0Z+dEd1Z,Gd2d3Z-dDd4Z.dDd5Z/e.Z0dDd6Z1Gd7d8Z2Gd9d:Z3dDddd;d<Z4ej5d=ej6j7Z8Gd>d?Z9d@Z:dAZ; eZZ>e>eedS#e?$rYdSwxYw)GaLightweight XML support for Python. XML is an inherently hierarchical data format, and the most natural way to represent it is with a tree. This module has two classes for this purpose: 1. ElementTree represents the whole XML document as a tree and 2. Element represents a single node in this tree. Interactions with the whole document (reading and writing to/from files) are usually done on the ElementTree level. Interactions with a single XML element and its sub-elements are done on the Element level. Element is a flexible container object designed to store hierarchical data structures in memory. It can be described as a cross between a list and a dictionary. Each Element has a number of properties associated with it: 'tag' - a string containing the element's name. 'attributes' - a Python dictionary storing the element's attributes. 'text' - a string containing the element's text content. 'tail' - an optional string containing text after the element's end tag. And a number of child elements stored in a Python sequence. To create an element instance, use the Element constructor, or the SubElement factory function. You can also use the ElementTree class to wrap an element structure and convert it to and from XML. )CommentdumpElement ElementTree fromstringfromstringlistindent iselement iterparseparse ParseErrorPIProcessingInstructionQName SubElementtostring tostringlist TreeBuilderVERSIONXMLXMLID XMLParser XMLPullParserregister_namespace canonicalizeC14NWriterTargetz1.3.0N) ElementPathceZdZdZdS)r zAn error when parsing an XML document. In addition to its exception value, a ParseError contains two extra attributes: 'code' - the specific exception code 'position' - the line and column of the error N)__name__ __module__ __qualname____doc__B/opt/alt/python-internal/lib64/python3.11/xml/etree/ElementTree.pyr r ks Dr%r c"t|dS)z2Return True if *element* appears to be an Element.tag)hasattr)elements r&r r ys 7E " ""r%ceZdZdZdZ dZ dZ dZ ifdZdZ dZ dZ dZ dZ d Zd Zd Zd Zd ZdZdZdZdZddZddZddZddZdZddZdZdZdZddZ dZ!dS)rahAn XML element. This class is the reference implementation of the Element interface. An element's length is its number of subelements. That means if you want to check if an element is truly empty, you should check BOTH its length AND its text attribute. The element tag, attribute names, and attribute values can be either bytes or strings. *tag* is the element name. *attrib* is an optional dictionary containing element attributes. *extra* are additional element attributes given as keyword arguments. Example form: text...tail Nc t|tstd|jj||_i|||_g|_dS)Nzattrib must be dict, not ) isinstancedict TypeError __class__r r(attrib _children)selfr(r1extras r&__init__zElement.__init__s\&$'' -) )),-- -))5) r%cJd|jj|jt|fzS)Nz<%s %r at %#x>)r0r r(idr3s r&__repr__zElement.__repr__s!4>#:DHbhh"OOOr%c.|||S)zCreate a new element with the same type. *tag* is a string containing the element name. *attrib* is a dictionary containing the element attributes. Do not call this method, use the SubElement factory function instead. )r0)r3r(r1s r& makeelementzElement.makeelements~~c6***r%c^tjdt|S)zReturn copy of current element. This creates a shallow copy. Subelements will be shared with the original tree. z7elem.copy() is deprecated. Use copy.copy(elem) instead.)warningswarnDeprecationWarning__copy__r8s r&copyz Element.copys.  E    }}r%c||j|j}|j|_|j|_||dd<|SN)r;r(r1texttail)r3elems r&r@zElement.__copy__s?$+66I I QQQ r%c*t|jSrC)lenr2r8s r&__len__zElement.__len__s4>"""r%cjtjdtdt|jdkS)NzyThe behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. stacklevelr)r=r> FutureWarningrHr2r8s r&__bool__zElement.__bool__s=  K a     4>""a''r%c|j|SrCr2r3indexs r& __getitem__zElement.__getitem__s~e$$r%ct|tr|D]}||n||||j|<dSrC)r-slice_assert_is_elementr2)r3rSr*elts r& __setitem__zElement.__setitem__sg eU # # - - -'',,,, -  # #G , , , 'ur%c|j|=dSrCrQrRs r& __delitem__zElement.__delitem__s N5 ! ! !r%cd|||j|dS)aAdd *subelement* to the end of this element. The new element will appear in document order after the last existing subelement (or directly after the text, if it's the first subelement), but before the end tag for this element. NrWr2appendr3 subelements r&r^zElement.appends4  +++ j)))))r%cn|D]1}|||j|2dS)zkAppend subelements from a sequence. *elements* is a sequence with zero or more elements. Nr])r3elementsr*s r&extendzElement.extendsJ   + +G  # #G , , , N ! !' * * * * + +r%cf|||j||dS)z(Insert *subelement* at position *index*.N)rWr2insert)r3rSr`s r&rezElement.inserts4  +++ eZ00000r%cxt|ts$tdt|jzdS)Nzexpected an Element, not %s)r- _Element_Pyr/typer )r3es r&rWzElement._assert_is_elements@![)) N9DGG)r0r rDr8s r&r9zQName.__repr__s  N333TYYY??r%c*t|jSrC)hashrDr8s r&__hash__zQName.__hash__sDIr%cbt|tr|j|jkS|j|kSrCr-rrDr3others r&__le__z QName.__le__0 eU # # +9 * *yE!!r%cbt|tr|j|jkS|j|kSrCrrs r&__lt__z QName.__lt__0 eU # # *9uz) )y5  r%cbt|tr|j|jkS|j|kSrCrrs r&__ge__z QName.__ge__rr%cbt|tr|j|jkS|j|kSrCrrs r&__gt__z QName.__gt__rr%cbt|tr|j|jkS|j|kSrCrrs r&__eq__z QName.__eq__rr%rC) r r!r"r#r5rr9rrrrrrr$r%r&rrs      @@@"""!!!"""!!!"""""r%rcreZdZdZddZdZdZddZddZddZ dd Z dd Z dd Z dd d dZ dZdS)ra%An XML element hierarchy. This class also provides support for serialization to and from standard XML. *element* is an optional root element node, *file* is an optional file handle or file name of an XML file whose contents will be used to initialize the tree with. NcF||_|r||dSdSrC)_rootr )r3r*files r&r5zElementTree.__init__s3   JJt       r%c|jS)z!Return root element of this tree.rr8s r&getrootzElementTree.getroots zr%c||_dS)zReplace root element of this tree. This will discard the current contents of the tree and replace it with the given element. Use with care! Nr)r3r*s r&_setrootzElementTree._setroot#s r%cd}t|dst|d}d} |Vt}t|dr8|||_|j|r|SS |d}|sn||.||_|j|r|SS#|r|wwxYw)a=Load external XML document into element tree. *source* is a file name or file object, *parser* is an optional parser instance that defaults to XMLParser. ParseError is raised if the parser fails to parse the document. Returns the root element of the given source document. FreadrbTN _parse_wholei)r)openrrrcloserfeed)r3sourceparser close_sourcedatas r&r zElementTree.parse-s vv&& &$''FL ~"6>22& "(!4!4V!AC$$C=c6|j|S)zCreate and return tree iterator for the root element. The iterator loops over all elements in this tree, in document order. *tag* is a string with the tag name to iterate over (default is to return all elements). )rrr3r(s r&rzElementTree.iterRszs###r%c|dddkr$d|z}tjd|ztd|j||S)a\Find first matching element by tag name or path. Same as getroot().find(path), which is Element.find() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found. Nr/.This search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rrKrL)r=r>rNrrmrns r&rmzElementTree.find^sc 8s??:D M-/34!      ztZ000r%c|dddkr$d|z}tjd|ztd|j|||S)aeFind first matching element by tag name or path. Same as getroot().findtext(path), which is Element.findtext() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found. NrrrrrKrL)r=r>rNrrrrss r&rrzElementTree.findtexttsg 8s??:D M-/34!      z""4*===r%c|dddkr$d|z}tjd|ztd|j||S)aaFind all matching subelements by tag name or path. Same as getroot().findall(path), which is Element.findall(). *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return list containing all matching elements in document order. NrrrrrKrL)r=r>rNrrvrns r&rvzElementTree.findallse 8s??:D M-/34!      z!!$ 333r%c|dddkr$d|z}tjd|ztd|j||S)agFind all matching subelements by tag name or path. Same as getroot().iterfind(path), which is element.iterfind() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return an iterable yielding all matching elements in document order. NrrrrrKrL)r=r>rNrrxrns r&rxzElementTree.iterfindse 8s??:D M-/34!      z""4444r%Tshort_empty_elementsc|sd}n|tvrtd|z|s |dkrd}nd}t||5\}}|dkrA|s0|=|dkr%|dvr|d |d |d krt ||jn:t |j|\} } t|} | ||j| | | ddddS#1swxYwYdS) aWrite element tree to a file as XML. Arguments: *file_or_filename* -- file name or a file object opened for writing *encoding* -- the output encoding (default: US-ASCII) *xml_declaration* -- bool indicating if an XML declaration should be added to the output. If None, an XML declaration is added if encoding IS NOT either of: US-ASCII, UTF-8, or Unicode *default_namespace* -- sets the default XML namespace (for "xmlns") *method* -- either "xml" (default), "html, "text", or "c14n" *short_empty_elements* -- controls the formatting of elements that contain no content. If True (default) they are emitted as a single self-closed tag, otherwise they are emitted as a pair of start/end tags xmlzunknown method %rc14nutf-8us-asciiNunicode)rrz rDr) _serialize ValueError _get_writerlower_serialize_textr _namespaces) r3file_or_filenameencodingxml_declarationdefault_namespacemethodrwritedeclared_encodingqnamesrp serializes r&rzElementTree.writes: ;FF : % %069:: : &"% )8 4 4 E8R@QO$,^^%%22&,,..6KKK%%%()))tz2222%0=N%O%O" &v.  %VZ/CEEEE E E E E E E E E E E E E E E E E E EsB!C,,C03C0c0||dS)Nr)r)r)r3rs r& write_c14nzElementTree.write_c14nszz$vz...r%rrC)NNNN)r r!r"r#r5rrr rrmrrrvrxrrr$r%r&rrs   ####J $ $ $ $1111,>>>>,4444,5555." $ 3E $( 3E3E3E3E3Ej/////r%rc#xK |j}|dkr|t|ddpdfVdStj5}t |t jr|}nt |t jr/t j |}| |j nLt j}d|_ ||_ |j |_ |j|_n#t$rYnwxYwt j||dd}| |j |j|fVddddS#1swxYwYdS#t$rV|dkrd}t#|d|d 5}|j|fVdddYdS#1swxYwYYdSwxYw) NrrrcdSNTr$r$r%r&z_get_writer..sDr%xmlcharrefreplace )rerrorsnewlinew)rr)rrgetattr contextlib ExitStackr-ioBufferedIOBase RawIOBaseBufferedWritercallbackdetachwritableseekabletellAttributeError TextIOWrapperr)rrrstackrs r&rrs-+ & >>  y ( (!1:tDDOO O O O O O%'' +5.0ABB+DD 0",??,-=>>DNN4;////,..D$0LDM!&DJ)9(A $4$9 )'19/B04666 t{+++j(****9 + + + + + + + + + + + + + + + + + + ''' >>  y ( (H "C(,... '15*h& & & & ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 'smEB E C21E 2 C?<E >C??AE  EE7F9 F* F9*F. .F91F. 2F98F9cddiird<fd}|D])}|j}t|tr|jvr||jnHt|t r|vr ||n#|!|t ur|turt|| D]^\}}t|tr|j}|vr ||t|tr|jvr||j_|j}t|tr|jvr||j+fS)Nc |dddkr|dddd\}}|}|9t|}|dtz}|dkr||<|r |d||<dS||<dSrt d||<dS#t $rt |YdSwxYw)Nrrrzns%dr:z.add_qname/s .RaRyC 9++C33S#,,>+//44F~!'#j//!9*0 3(/5vvss$;F5MMM$'F5MMM$$3!&u  . . . &u - - - - - - .sB B/B/B//C  C ) rr(r-rrDrrr rr) rFrrr(r}rrDrprs ` @@r&rr$sD\FJ+(* $%.......8 !!h c5 ! ! ,xv%% #(### S ! ! ,&   # _G!3!32 &s + + +**,, & &JC#u%% h&   #%'' &EJf,D,D %*%%%y dE " " !ty'>'> Idi : r%c |j}|j}|tur|d|zn|tur|d|zn||}|5|r|t ||D]}t |||d|na|d|zt |} | s|r|rPt|dD]+\} } | rd| z} |d| d t| d ,| D]k\} } t| tr| j} t| tr|| j} nt| } |d || d | d l|st|s|sP|d |r|t ||D]}t |||d||d |zd zn |d|j r|t |j dSdS)N rrc|dSNrr$xs r&rz _serialize_xml..w QqTr%r}r xmlns=""rr)r(rDrr _escape_cdata_serialize_xmllistrsorted_escape_attribr-rrHrE) rrFrrprkwargsr(rDrirvks r&rras (C 9D g~~ kD !!!! % % % hoSk ; +mD))*** J Jua4HJJJJJ J E#)   &&E 9  9 &z'7'7'9'9+9>!;!;!;1( #aAAA*1----"99DAq!!U++#F!!U++."16N*1--EE&)))QQQ78888 s4yy (< c /E---...NNA"5!VT8LNNNNNdSj3&''''e  y( mDI&&'''''((r%>brhrcolimgwbrareabaselinkmetaembedframeinputparamtrackrisindexbasefontc j|j}|j}|tur|dt|zn|tur|dt|zn||}|3|r|t||D]}t |||dnu|d|zt |}|s|r|rPt|dD]+\} } | rd| z} |d| dt| d ,|D]k\} } t| tr| j} t| tr|| j} nt| } |d || d| d l|d | } |r0| d ks| d kr ||n|t||D]}t |||d| tvr|d|zd z|jr|t|jdSdS)Nr r rc|dSr r$rs r&rz!_serialize_html..rr%rrrrrrrscriptstyler)r(rDrrr_serialize_htmlrrrrr-r_escape_attrib_htmlr HTML_EMPTYrE) rrFrrprr(rDrirrrltags r&r2r2s (C 9D g~~ kM$///0000 % % % ht,,,----Sk ; +mD))*** 8 8q&$7777 8 E#)   &&E 9  9 &z'7'7'9'9+9>!;!;!;1( #aAAA*1----"99DAq!!U++#F!!U++3"16N/22EE&)))QQQ78888 E#JJJ99;;D /8##twE$KKKKE---... 8 8q&$7777:%%dSj3&''' y( mDI&&'''''((r%c||D] }|||jr||jdSdSrC)rrE)rrFparts r&rrsT  d  y dir%)rhtmlrDctjd|rtdttD]\}}||ks||krt|=|t|<dS)atRegister a namespace prefix. The registry is global, and any existing mapping for either the given prefix or the namespace URI will be removed. *prefix* is the namespace prefix, *uri* is a namespace uri. Tags and attributes in this namespace will be serialized with prefix if possible. ValueError is raised if prefix is reserved or is invalid. zns\d+$z'Prefix format reserved for internal useN)rematchrrrr)rrrrs r&rrsy x 6""DBCCC^))++,,""1 88qF{{q! N3r%rr8rdfwsdlxsxsidc)$http://www.w3.org/XML/1998/namespacezhttp://www.w3.org/1999/xhtmlz+http://www.w3.org/1999/02/22-rdf-syntax-ns#z http://schemas.xmlsoap.org/wsdl/z http://www.w3.org/2001/XMLSchemaz)http://www.w3.org/2001/XMLSchema-instancez http://purl.org/dc/elements/1.1/cRtd|dt|jd)Nzcannot serialize z (type ))r/rhr rs r&rrs1 )+/44d1D1D1DE   r%c d|vr|dd}d|vr|dd}d|vr|dd}|S#ttf$rt|YdSwxYw)N&&r<r>replacer/rrrs r&rrs ) $;;<<W--D $;;<<V,,D $;;<<V,,D ~ &)))"4(((((()AA A65A6c d|vr|dd}d|vr|dd}d|vr|dd}d|vr|dd}d |vr|d d }d |vr|d d }d |vr|d d}|S#ttf$rt|YdSwxYw)NrErFrrGrrHr" z rz  z rIrs r&rrs ) $;;<<W--D $;;<<V,,D $;;<<V,,D 4<<<<h//D 4<<<<g..D 4<<<<g..D 4<<<<g..D ~ &)))"4(((((()sB7B:: CCc d|vr|dd}d|vr|dd}d|vr|dd}|S#ttf$rt|YdSwxYw)NrErFrrHrrMrIrs r&r3r3+s ) $;;<<W--D $;;<<V,,D 4<<<<h//D ~ &)))"4(((((()rKT)rrrc|dkrtjntj}t||||||||S)a Generate string representation of XML element. All subelements are included. If encoding is "unicode", a string is returned. Otherwise a bytestring is returned. *element* is an Element instance, *encoding* is an optional output encoding defaulting to US-ASCII, *method* is an optional output which can be one of "xml" (default), "html", "text" or "c14n", *default_namespace* sets the default XML namespace (for "xmlns"). Returns an (optionally) encoded string containing the XML data. rrrrr)rStringIOBytesIOrrgetvalue)r*rrrrrstreams r&rr:sm ')33R[]]]Fvx/>1B&,4H JJJ ??  r%c0eZdZdZdZdZdZdZdZdS)_ListDataStreamz7An auxiliary stream accumulating into a list reference.c||_dSrC)lst)r3rZs r&r5z_ListDataStream.__init__Ts r%cdSrr$r8s r&rz_ListDataStream.writableWtr%cdSrr$r8s r&rz_ListDataStream.seekableZr\r%c:|j|dSrC)rZr^)r3bs r&rz_ListDataStream.write]s r%c*t|jSrC)rHrZr8s r&rz_ListDataStream.tell`s48}}r%N) r r!r"r#r5rrrrr$r%r&rXrXRseAAr%rXcxg}t|}t||||||||S)NrR)rXrr)r*rrrrrrZrVs r&rrcsU C S ! !Fvx/>1B&,4H JJJ Jr%c t|tst|}|tjd|j}|r |ddkr!tjddSdS)a#Write element tree or element structure to sys.stdout. This function should be used for debugging only. *elem* is either an ElementTree, or a single Element. The exact output format is implementation dependent. In this version, it's written as an ordinary XML file. r)rrN)r-rrsysstdoutrrE)rFrEs r&rrps dK ( (!4  JJszIJ... <<>> D 48t## $#r% ct|tr|}|dkrtd|t |sdSd|zzgfd|ddS)a&Indent an XML document by inserting newlines and indentation space after elements. *tree* is the ElementTree or Element to modify. The (root) element itself will not be changed, but the tail text of all elements in its subtree will be adapted. *space* is the whitespace to insert for each indentation level, two space characters by default. *level* is the initial indentation level. Setting this to a higher value than 0 can be used for indenting subtrees that are more deeply nested inside of a document. rz,Initial indentation level must be >= 0, got Nrc|dz} |}n0#t$r#|z}|YnwxYw|jr|js||_|D]D}t |r |||jr|js||_E|js||_dSdSr ) IndexErrorr^rDstriprHrE)rFlevel child_levelchild_indentationchild_indent_children indentationsspaces r&roz indent.._indent_childrensai  3 ,[ 9   3 3 3 ,U 3e ;     1 2 2 2 2 2 3y *  1 1 *)DI / /E5zz 5   444: /UZ%5%5%7%7 /. z!! -%e,EJJJ - -s *>>)r-rrrrH)treerqrkrorps ` @@r&rrs$ $$||~~ qyyOOOPPP t9955=()L-------,T1r%cNt}||||S)zParse XML document into element tree. *source* is a filename or file object containing XML data, *parser* is an optional parser instance defaulting to XMLParser. Return an ElementTree instance. )rr )rrrrs r&r r s& ==DJJvv Kr%ct||tdstddndfdGfddtjj}|}d |_tj||S) aJIncrementally parse XML document into ElementTree. This class also reports what's going on to the user based on the *events* it is initialized with. The supported events are the strings "start", "end", "start-ns" and "end-ns" (the "ns" events are used to get detailed namespace information). If *events* is omitted, only "end" events are reported. *source* is a filename or file object containing XML data, *events* is a list of events to report back, *parser* is an optional parser instance. Returns an iterator providing (event, elem) pairs. )events_parserrrTFc3K Ed{V|d}|sn|H}Ed{V}|||_r|dSdS#r|wwxYw)NTi@) read_eventsrr_close_and_return_rootrootr)rrrzitr pullparserwrs r&iteratorziterparse..iterators  &%11333333333{{9--%%%  &4466D!--// / / / / / / /B~    |   s B B))Cc<eZdZjZfdZdS)$iterparse..IterParseIteratorc8rdSdSrC)r)r3rrs r&__del__z,iterparse..IterParseIterator.__del__s&    r%N)r r!r"__next__r)rr~rsr&IterParseIteratorrsE8F##,        r%rN) rr)r collectionsabcIteratorrzweakrefref) rrurrr{rr~r|r}s ` @@@@r&r r s"ff===J 66 " "fd##  $KO4    BBG RB Ir%c:eZdZd dddZdZdZdZdZdZdS) rN)rvctj|_|ptt |_|d}|j|j|dS)Nr)end)rdeque _events_queuerrrv _setevents)r3rurvs r&r5zXMLPullParser.__init__s[ ).00A);=="A"A"A >F  2F;;;;;r%c|jtd|rO |j|dS#t$r%}|j|Yd}~dSd}~wwxYwdS)Feed encoded data to parser.Nz!feed() called after end of stream)rvrr SyntaxErrorrr^)r3rexcs r&rzXMLPullParser.feed s < @AA A  / / !!$''''' / / /"))#......... / / /s6 A%A  A%cF|j}d|_|SrC)rvr)r3rzs r&ryz$XMLPullParser._close_and_return_roots!|!!##  r%c.|dS)zFinish feeding data to parser. Unlike XMLParser, does not return the root element. Use read_events() to consume elements from XMLPullParser. N)ryr8s r&rzXMLPullParser.closes ##%%%%%r%c#K|j}|r3|}t|tr||V|1dSdS)zReturn an iterator over currently available (event, elem) pairs. Events are consumed from the internal event queue as they are retrieved from the iterator. N)rpopleftr- Exception)r3ruevents r&rxzXMLPullParser.read_events%se # NN$$E%++        r%cd|jtd|jdS)Nz"flush() called after end of stream)rvrflushr8s r&rzXMLPullParser.flush3s3 < ABB B r%rC) r r!r"r5rryrrxrr$r%r&rrs >r%c|stt}|||}i}|D]}|d}|r|||<||fS)aParse XML document from string constant for its IDs. *text* is a string containing XML data, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an (Element, dict) tuple, in which the dict maps element id:s to elements. rr7)rrrrrr|)rDrrridsrFr7s r&rrJs 1+--000 KK <<>>D C  XXd^^  CG 9r%c|stt}|D]}|||S)zParse XML document from sequence of string fragments. *sequence* is a list of other sequence, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an Element instance. rr)sequencerrDs r&rrbsR 1+--000 D <<>>r%cXeZdZdZdddddddZdZdZdZd Zd Z d Z dd Z d Z dS)ra8Generic element structure builder. This builder converts a sequence of start, data, and end method calls to a well-formed element structure. You can use this class to build an element structure using a custom XML parser, or a parser for some other XML-like format. *element_factory* is an optional element factory which is called to create new Element instances, as necessary. *comment_factory* is a factory to create comments to be used instead of the standard factory. If *insert_comments* is false (the default), comments will not be inserted into the tree. *pi_factory* is a factory to create processing instructions to be used instead of the standard factory. If *insert_pis* is false (the default), processing instructions will not be inserted into the tree. NF)comment_factory pi_factoryinsert_comments insert_piscg|_g|_d|_d|_d|_|t }||_||_|t}||_ ||_ |t}||_ dSrC) _data_elem_lastr_tailr_comment_factoryrr _pi_factoryrr_factory)r3element_factoryrrrrs r&r5zTreeBuilder.__init__sr      "%O /.  .J%$  "%O' r%c|jS)z;Flush builder buffers and return toplevel document Element.rr8s r&rzTreeBuilder.closes zr%c|jrJ|j:d|j}|jr ||j_n ||j_g|_dSdSNr)rrjoinrrErDr3rDs r&_flushzTreeBuilder._flushs\ : z%wwtz**:+&*DJOO'+DJODJJJ  r%c:|j|dS)zAdd text to current element.N)rr^r3rs r&rzTreeBuilder.datas $r%c||||x|_}|jr!|jd|n|j||_|j|d|_|S)zOpen new element and return it. *tag* is the element name, *attrs* is a dict containing element attributes. rcNr)rrrrr^rr)r3r(attrsrFs r&startzTreeBuilder.starts  MM#u555 T :  JrN ! !$ ' ' ' ' Z DJ $  r%c||j|_d|_|jS)zOClose and return current Element. *tag* is the element name. r)rrpoprrrs r&rzTreeBuilder.ends5 Z^^%%  zr%cD||j|j|S)z`Create a comment using the comment_factory. *text* is the text of the comment. )_handle_singlerrrs r&commentzTreeBuilder.comments) ""  !4#7?? ?r%cF||j|j||S)zCreate a processing instruction using the pi_factory. *target* is the target name of the processing instruction. *text* is the data of the processing instruction, or ''. )rrr)r3rrDs r&pizTreeBuilder.pis* ""  dovt== =r%c||}|rI|||_|jr |jd|d|_|S)Nrcr)rrrr^r)r3factoryreargsrFs r&rzTreeBuilder._handle_singlesYw~   KKMMMDJz , 2%%d+++DJ r%rC) r r!r"r#r5rrrrrrrrr$r%r&rrts&(!%$!&5((((((      "   ???====r%rcbeZdZdZddddZdZdZdZdZd Z d Z d Z d Z d Z dZdZdS)raaElement structure builder for XML source data based on the expat parser. *target* is an optional target object which defaults to an instance of the standard TreeBuilder class, *encoding* is an optional encoding string which if given, overrides the encoding specified in the XML file: http://www.iana.org/assignments/character-sets N)rrc@ ddlm}n3#t$r& ddl}n#t$rtdwxYwYnwxYw||d}|t }|x|_|_|x|_|_ |j |_ i|_ |j |_t|dr |j|_t|dr |j|_t|dr |j|_t|dr |j|_t|d r |j|_t|d r |j|_t|d r |j|_d |_d |_d|_ i|_! d |j"z|_#dS#tH$rYdSwxYw)Nrexpatz7No module named expat; use SimpleXMLTreeBuilder insteadrrrstart_nsend_nsrrrrzExpat %d.%d.%d)% xml.parsersr ImportErrorpyexpat ParserCreaterrrvr_targeterror_error_names_defaultDefaultHandlerExpandr)_startStartElementHandler_endEndElementHandler _start_nsStartNamespaceDeclHandler_end_nsEndNamespaceDeclHandlerrCharacterDataHandlerrCommentHandlerrProcessingInstructionHandler buffer_textordered_attributes_doctypeentity version_infoversionr)r3rrrrs r&r5zXMLParser.__init__s  ) ) ) ) ) ) )    '''''   !M (' ##Hc22 > ]]F%++ dl%++ dlk  &*m# 67 # # 5)-F & 65 ! ! 1'+yF $ 6: & & >/3~F , 68 $ $ :-1\F * 66 " " 6*0+F ' 69 % % 3$*NF ! 64  <28)F /$%!   +e.@@DLLL    DD s. 99399>F FFc|j}|j}|D]}|dkrd|_|||jfd}||_#|dkr|||jfd}||_=|dkr0t|jdr |||j fd}n||fd }||_ s|d kr0t|jd r |||j fd }n||fd }||_ |dkr|||fd}||_ |dkr|||fd}||_td|zdS)Nrrc4|||||fdSrCr$)r( attrib_inrr^rs r&handlerz%XMLParser._setevents..handler1s)FE55i#8#89:::::r%rc2||||fdSrCr$)r(rr^rs r&rz%XMLParser._setevents..handler6s%FE33s88,-----r%zstart-nsrc4|||||fdSrCr$)rrrr^rs r&rz%XMLParser._setevents..handler=s)xx'<'<=>>>>>r%c,|||pd|pdffdSrr$)rrrr^s r&rz%XMLParser._setevents..handlerAs* "ciR'@ABBBBBr%zend-nsrc2||||fdSrCr$)rrr^rs r&rz%XMLParser._setevents..handlerGs%vvf~~677777r%c ||dfdSrCr$)rrr^s r&rz%XMLParser._setevents..handlerKst}-----r%rcP|||j|fdSrC)rr)rDrr^r3s r&rz%XMLParser._setevents..handlerOs-FE4;#6#6t#<#<=>>>>>r%rcR|||j||fdSrC)rr) pi_targetrrr^r3s r&rz%XMLParser._setevents..handlerSs-FE4;>>)T#B#BCDDDDDr%zunknown event %r)rvr^rrrrrr)rrrrrrrr)r3 events_queueevents_to_reportrr^ event_namers r&rzXMLParser._setevents%s$** B* BJW$$,-)2fCCCC3:00x''4;11..8'+|88888/9....18..y(((26????(/%%t##3=f!%EEEE7>33 !3j!@AAAU* B* Br%cbt|}|j|_|j|jf|_|rC)r codelinenooffsetposition)r3rerrs r& _raiseerrorzXMLParser._raiseerrorZs-:|U\1  r%cn |j|}n%#t$r|}d|vrd|z}||j|<YnwxYw|S)Nrr)rKeyError)r3r}names r&_fixnamezXMLParser._fixname`s` $;s#DD $ $ $Dd{{Tz#DK     $  s 22c@|j|pd|pdSr)rrr3rrs r&rzXMLParser._start_nsks"{##FLb#)<<tdt|dD]}||dz||||< |j||S)NrrKr)rrangerHrr)r3r( attr_listfixnamer1is r&rzXMLParser._startqs-gcll  ?1c)nna00 ? ?09!A#wwy|,,--{  f---r%c\|j||SrC)rrrrs r&rzXMLParser._end}s"{t}}S11222r%c|dd}|dkr |jj}n#t$rYdSwxYw ||j|dddS#t$raddlm}|d||jj |jj fz}d|_ |jj |_ |jj |_ |wxYw|dkr|dd d kr g|_dS|j|d kr d|_dS|}|sdS|j|t#|j}|d kr|jd}|d kr|dkr|j\}}} } | r | dd} n|dkr|dkr|j\}}} d} ndSt%|jdr%|j|| | ddn*t%|drt)jdt,d|_dSdSdS)NrrErcrrz'undefined entity %s: line %d, column %d r z RuntimeWarning) r3rDr data_handlerrrnrhrpubidsystems r&rzXMLParser._defaults}bqb S== #{/ !      T[ad455555   ------kk=4;6K133 ![8 ![:   s]]tBQBx;66DMMM ] &}} $ ::< AAA A) B) A63B5A66B Bcp|j} |jd|jddn,#|j$r}||Yd}~nd}~wwxYw|j|dS#|j|wxYw)NFr%)rGetReparseDeferralEnabledSetReparseDeferralEnabledrrr)r3 was_enabledrs r&rzXMLParser.flushsk;;==  ? K 1 1% 8 8 8 K  c5 ) ) ) ){     Q          K 1 1+ > > > > >DK 1 1+ > > > >s/5AB A:A50B5A::BB5)r r!r"r#r5rrrrrrrrrrrr$r%r&rrs"&+++++Z3B3B3Bj   ===000 . . .3334%4%4%l   ***"?????r%r)out from_filec H||tdd}|tjx}}tt |jfi|}|*|||n|t|||| ndS)a3Convert XML to its C14N 2.0 serialised form. If *out* is provided, it must be a file or file-like object that receives the serialised canonical XML output (text, not bytes) through its ``.write()`` method. To write to a file, open it in text mode with encoding "utf-8". If *out* is not provided, this function returns the output as text string. Either *xml_data* (an XML string) or *from_file* (a file path or file-like object) must be provided as input. The configuration options are the same as for the ``C14NWriterTarget``. Nz:Either 'xml_data' or 'from_file' must be provided as inputr)r) rrrSrrrrrr rU)xml_datar!r"optionssiors r&rrsI-UVVV C {KMM!c .syDDGDD E E EF H    i'''' _3<<>>>$6r%z ^\w+:\w+$ceZdZdZdddddddddZefdZdZddZd Z d j fd Z d Z d Z ddZdZdZdZdS)ra Canonicalization writer target for the XMLParser. Serialises parse events to XML C14N 2.0. The *write* function is used for writing out the resulting data stream as text (not bytes). To write to a file, open it in text mode with encoding "utf-8" and pass its ``.write`` method. Configuration options: - *with_comments*: set to true to include comments - *strip_text*: set to true to strip whitespace before and after text content - *rewrite_prefixes*: set to true to replace namespace prefixes by "n{number}" - *qname_aware_tags*: a set of qname aware tag names in which prefixes should be replaced in text content - *qname_aware_attrs*: a set of qname aware attribute names in which prefixes should be replaced in text content - *exclude_attrs*: a set of attribute names that should not be serialised - *exclude_tags*: a set of tag names that should not be serialised FN) with_comments strip_textrewrite_prefixesqname_aware_tagsqname_aware_attrs exclude_attrs exclude_tagscX||_g|_||_||_|rt |nd|_|rt |nd|_||_|rt ||_nd|_|rt |j |_ nd|_ dgg|_ g|_ |s>|j tt|j gi|_dg|_d|_d|_d|_d|_dS)N)rArFr)_writer_with_comments _strip_textr_exclude_attrs _exclude_tags_rewrite_prefixes_qname_aware_tags intersection_find_qname_aware_attrs_declared_ns_stack _ns_stackr^rrr _prefix_map_preserve_space_pending_start _root_seen _root_done_ignored_depth) r3rr(r)r*r+r,r-r.s r&r5zC14NWriterTarget.__init__sE  +%4AKc-000t2>HS...D!1  *%()9%:%:D " "%)D "  0+./@+A+A+ND ( (+/D ( <$ #  @ N ! !$~';';'='=">"> ? ? ? b!!! %w"r%c#:K||D] }|r|Ed{V dSrCr$)r3ns_stack _reversedrps r&_iter_namespacesz!C14NWriterTarget._iter_namespaces7sJ#)H-- & &J &%%%%%%%% & &r%c|dd\}}||jD]\}}||kr d|d|cStd|d|d)NrrrrzPrefix z of QName "" is not declared in scope)splitrDr:r)r3 prefixed_namerrrps r&_resolve_prefix_namez%C14NWriterTarget._resolve_prefix_name<s$**322 ++DN;; * *FCF{{)C))4)))))_6__m___```r%c|4|dddkr|ddddnd|f\}}n|}t}||jD]4\}}||kr||vr|r|d|n|||fcS||5|jrd||jvr|j|}n!dt|jx}|j|<|jd||f|d|||fS|s d|vr|||fS||j D]=\}}||kr2|jd||f|r|d|n|||fcS>|s|||fStd|d ) Nrrrrrrrcz Namespace "rF) rrrDr9addr5r;rHr^r:r)r3rrr( prefixes_seenurs r&_qnamezC14NWriterTarget._qnameCs$ ;38!93C3CuQRRy''Q///"eHCC ..t/FGG & &IAvCxxF-77,2;&((3(((S#EEEE   f % % % %  ! /d&&&)#.1LS9I5J5J1L1LL)#.  #B ' . .V} = = =$$s$$c3. . !r..S= ..t~>> F FIAvCxx'+22C=AAA,2;&((3(((S#EEEE !S= FsFFFGGGr%cL|js|j|dSdSrC)r@rr^rs r&rzC14NWriterTarget.datahs3" $ J  d # # # # # $ $r%rcd||j}|jdd=|jr!|jds|}|j7|jdc}|_|rt |r|nd}|jg||R|dS|r+|jr&|t|dSdSdSNrc) rr2r<rjr=_looks_like_prefix_namerr>r0_escape_cdata_c14n)r3 _join_textrr qname_texts r&rzC14NWriterTarget._flushlsz$*%% JqqqM   D$8$< ::<D  F C/////r%cj"|r fd|D}|h|}i}|/|x}||<||jh|rf|}|rL|D]H} || } t | r/| x}|| <||Ind}nd}jfdt|dD} |r!d|D} | ng} |rlt|D]J\} }|| |vr||vr| ||d}| | \}} }| |r|n| |fK| d}j |r|dkn j d j }|d | |dz| r(|d d | D|d |*|t| ||dd_j gdS)Nc.i|]\}}|jv||Sr$)r3).0rrr3s r& z+C14NWriterTarget._start..s,TTTdaq@S7S7SQ7S7S7Sr%c(i|]}||Sr$r$)r\r parse_qnames r&r]z+C14NWriterTarget._start..s/444qKKNN444r%c.|ddS)Nrr)rG)rs r&rz)C14NWriterTarget._start..s!''#q//r%rc*g|]\}}|rd|znd|fS)zxmlns:xmlnsr$)r\rrs r& z+C14NWriterTarget._start..s@C'-9F""'3?r%rz+{http://www.w3.org/XML/1998/namespace}spacepreservercrrc@g|]\}}d|dt|dS)rrr)_escape_attrib_c14n)r\rrs r&rcz+C14NWriterTarget._start..s9TTT$!Q=q==$7$:$:===TTTr%rT)r3rrJrLr8rSrOrsortr^r|r<r0rrTr>r:)r3r(rrYrVrresolved_namesrqattrs attr_namer parsed_qnamesrrr attr_qnamerspace_behaviourrr_s` @r&rzC14NWriterTarget._starts6   *u *TTTTekkmmTTTE  !151J1J:1V1V VEN:. JJu     ' 3 311%88F !'**I!),E.u55*8<8Q8QRW8X8XXu 5 5))) * Fk 4444F 11535353444   #1I NN    I  Hu{{}}-- H H1%!v++!~:M:M%nQ&78;A-:1-=* Is  "B**A!FGGGG ))$QRR ##-< *Oz ) )%b) + + +   cM#&q))***  W E"''TT)TTTUU V V V c   ! E$]>*3M%Nq%QRR S S S b!!!!!r%c|jr|xjdzc_dS|jr||d||dd|jt|jdk|_|j |j dS)Nrrrr) r@rrr0rOr<rrHr?r9r:rs r&rzC14NWriterTarget.ends      1 $   F :  KKMMM /S))!,///000   """d233q8 ##%%% r%c0|jsdS|jrdS|jr|dn"|jr|jr||dt|d|js|ddSdS)Nrz)r1r@r?r0r>rrrTrs r&rzC14NWriterTarget.comments"  F    F ?  KK     _   KKMMM 8-d33888999  KK       r%c4|jrdS|jr|dn"|jr|jr|||rd|dt |dnd|d|js|ddSdS)Nrz)r@r?r0r>rrrT)r3rrs r&rzC14NWriterTarget.pis    F ?  KK     _   KKMMM :> S 6 6 6,T22 6 6 6 6OOOO U U U  KK       r%rC)r r!r"r#r5reversedrDrJrOrrrrrrrrrr$r%r&rrs, %"&$#$# # # # # J4<&&&& aaa#H#H#H#HJ$$$!# 2 2 2 2111000"C"C"C"C"J           r%rc& d|vr|dd}d|vr|dd}d|vr|dd}d|vr|dd}|S#ttf$rt|YdSwxYw) NrErFrrGrrHrN rIrs r&rTrTs) $;;<<W--D $;;<<V,,D $;;<<V,,D 4<<<<g..D ~ &)))"4(((((()sA)A,, BBc d|vr|dd}d|vr|dd}d|vr|dd}d|vr|dd}d |vr|d d }d |vr|d d }|S#ttf$rt|YdSwxYw) NrErFrrGrrMrOz rz rNrsrIrs r&rfrfs) $;;<<W--D $;;<<V,,D $;;<<X..D 4<<<<g..D 4<<<<g..D 4<<<<g..D ~ &)))"4(((((()sBB CC)r)_set_factoriesrCr)rfr)@r#__all__rrdr:r=rrcollections.abcrrrrrr r rrrrr rrcontextmanagerrrrr4r2rrrrrrrr3rrrXrrrr r rrrrrrrrcompileUNICODEr;rSrrTrfrg _elementtreerurr$r%r&r|s'!!P   (             ### jjjjjjjjZ $&$     +"+"+"+"+"+"+"+"`_/_/_/_/_/_/_/_/H /+/+/+b;;;;z0(0(0(d 0(0(0(d    !!!*-2$*38(.(,16(,  %3!   ))) )))8 ) ) )!T"&0b'" !%&*     &////l    5555p77777777t",     $vvvvvvvvth?h?h?h?h?h?h?h?Z7tt77777<%"*\2:>>DD)))&))). 3K++++++N7122222   DD s E77F?FPK!CfY(__pycache__/cElementTree.cpython-311.pycnu[ !A?hRddlTdS))*N)xml.etree.ElementTreeC/opt/alt/python-internal/lib64/python3.11/xml/etree/cElementTree.pyrs$#####rPK!W*__pycache__/__init__.cpython-311.opt-1.pycnu[ !A?hEdS)Nr?/opt/alt/python-internal/lib64/python3.11/xml/etree/__init__.pyrsrPK!xTK""0__pycache__/ElementInclude.cpython-311.opt-1.pycnu[ !A?hddlZddlmZddlmZdZedzZedzZdZGd d e Z Gd d e Z dd Z ddefdZ dZdS)N) ElementTree)urljoinz!{http://www.w3.org/2001/XInclude}includefallbackceZdZdS)FatalIncludeErrorN__name__ __module__ __qualname__E/opt/alt/python-internal/lib64/python3.11/xml/etree/ElementInclude.pyr r CDrr ceZdZdS)LimitedRecursiveIncludeErrorNr rrrrrGrrrc4|dkrOt|d5}tj|}dddn #1swxYwYnB|sd}t|d|5}|}dddn #1swxYwY|S)NxmlrbzUTF-8r)encoding)openrparsegetrootread)hrefrrfiledatas rdefault_loaderr!Ws ~~ $   5$T**2244D 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 H $h / / / 499;;D                Ks#'A  AA,B  BBc|d}n|dkrtd|zt|dr|}|t}t ||||t dS)Nrz;expected non-negative depth or None for 'max_depth', got %rr) ValueErrorhasattrrr!_includeset)elemloaderbase_url max_depths rrrtsv QVYbbccctY||~~ ~ T68Y66666rcNd}|t|kr||}|jtkr|d}|rt ||}|dd}|dkr||vrt d|z|dkrt d|z|||||} | t d|d|tj| } t| |||d z || ||j r| j pd |j z| _ | ||<n|d kr}||||d } | t d|d||j r | |j z } |r||d z } | j pd | z| _ n|j pd | z|_ ||=t d |z|jtkrt d|jzt||||||d z }|t|k dSdS)Nrrrrzrecursive include of %sz5maximum xinclude depth reached when including file %sz cannot load z as rtextrz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r))lentagXINCLUDE_INCLUDEgetrr raddcopyr&removetailr.XINCLUDE_FALLBACK) r(r)r*r+ _parent_hrefsierrnoder.s rr&r&s A c$ii-- G 5$ $ $55==D /x..EE'5))E~~=((+,E,LMMM>>6ORVVXXX!!$'''vdE**<++26$$>yvtY]MJJJ$$T***6;!%bAF :DIQ&vdE155+<+<==<++26$$>6#AFND9!9D!%bD 8DII!%bD 8DIG'?%GU' ' '#BQUJ  Q)] C C C Qg c$ii------r)N)r4r-r urllib.parserXINCLUDEr1r7DEFAULT_MAX_INCLUSION_DEPTH SyntaxErrorr rr!rr&rrrr@sf  .i'z)               #4      :1 7 7 7 766666rPK!~h@eCeC-__pycache__/ElementPath.cpython-311.opt-2.pycnu[ !A?h6ddlZejdZddZdZdZdZdZdZd Z d Z d Z d Z eee e e e d Z iZGddZddZddZddZddZdS)Nz`('[^']*'|\"[^\"]*\"|::|//?|\.\.|\(\)|!=|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@!=\s]+)|\s+c#K|r|dnd}d}t|D]}|\}}|r|ddkrsd|vrW|dd\}} |st|d||d|fVn6#t$rt d|zdwxYw|r|s |d|d|fVn|Vd}|V|d k}dS) NFr{:}z!prefix %r not found in prefix map@)getxpath_tokenizer_refindallsplitKeyError SyntaxError) pattern namespacesdefault_namespaceparsing_attributetokenttypetagprefixuris B/opt/alt/python-internal/lib64/python3.11/xml/etree/ElementPath.pyxpath_tokenizerrJsY.8B r***d#++G44-- s  -3q6S==czz!iiQ// ^%'&%Z-?-?-?!EEEEEE^^^%&IF&RSSY]]^" +< e):):):CC@@@@@@ %  KKK %  %--s +BB%cv|j}|/ix|_}|jD] }|D]}|||< |SN) parent_maprootiter)contextrpes rget_parent_mapr#bs_#J*,,Z""$$ " "A " " ! 1  " c:|dddkp |dddkS)N{*}}*rs r_is_wildcard_tagr,ls' rr7e  /s233x4//r$cttcdkrfd}ndkrfd}ndddkr<ddtt dddfd}nPd dd kr0dd tdtfd }nt d |S)Nz{*}*c3@K|D]}|jr|VdSrr+)r resultelem _isinstance_strs rselectz_prepare_tag..selectvs@  ;tx..JJJ  r$z{}*c3\K|D]%}|j}|r|ddkr|V&dS)Nrrr+)r r/r0el_tagr1r2s rr3z_prepare_tag..select|sS  ;vt,,c1A1AJJJ  r$r&r'c3hK|D]+}|j}|ks|r|kr|V,dSrr+) r r/r0r5r1r2no_nssuffixrs rr3z_prepare_tag..selectsY  S==KK$=$==&-SYBYBYJJJ  r$r(r)c3\K|D]%}|j}|r|kr|V&dSrr+)r r/r0r5r1r2nsns_onlys rr3z_prepare_tag..selectsS  ;vt,,B1F1FJJJ  r$zinternal parser error, got ) isinstancestrslicelen RuntimeError)rr3r1r2r8r<r=r9s` @@@@@@r _prepare_tagrCpsi"CK f}}                RaRE  QRRs6{{lD))!""g           RSST   "Xc"gg&&          >>>??? Mr$c|dtrtfd}ndddkr ddfd}|S)Nrc4d}|||S)Nc3$K|D] }|Ed{V dSrr*)r/r0s r select_childz3prepare_child..select..select_childs2"$$D#OOOOOOOO$$r$r*r r/rG select_tags rr3zprepare_child..selects0 $ $ $:g||F';';<< K|D]}|D]}|jkr|VdSrr+r r/r0r"rs rr3zprepare_child..selectsI    Au||   r$)r,rCnextrr3rIrs @@r prepare_childrOs (C !#&&  = = = = = = rr7d??abb'C     Mr$c d}|S)Nc3$K|D] }|Ed{V dSrr*)r r/r0s rr3zprepare_star..selects2  DOOOOOOOO  r$r*rNrr3s r prepare_starrSs Mr$c d}|S)Nc3K|Ed{VdSrr*)r r/s rr3zprepare_self..selects$r$r*rRs r prepare_selfrVs Mr$c$ |}n#t$rYdSwxYw|ddkrdn |ds |dntdtrtfd}ndddkr ddfd}|S) Nr*rzinvalid descendantc4d}|||S)Nc3RK|D]!}|D] }||ur|V "dSrr)r/r0r"s rrGz8prepare_descendant..select..select_childsN"$$D!YY[[$$D=="#GGG$$$r$r*rHs rr3z"prepare_descendant..selects0 $ $ $ :g||F';';<< .selectsQ  3  A}}   r$) StopIterationrr,rCrMs @@rprepare_descendantr^s  Qx3 1X0Ah./// !#&&  = = = = = = rr7d??abb'C     Ms  c d}|S)Nc3hKt|}i}|D]}||vr||}||vr d||<|VdSr)r#)r r/r result_mapr0parents rr3zprepare_parent..selectse#G,,   ! !Dz!!#D)++)-Jv& LLL  ! !r$r*rRs rprepare_parentrcs ! ! ! Mr$c g}g} |}n#t$rYdSwxYw|ddkrnl|dkr2|dr$|ddddvrd|dddf}||dpd||dd |}|d kr|dfd }|S|d ks|d kr$|d|d  fd} fd}d|vr|n|S|dkr*tjd|ds|dfd}|S|dks-|dks'|dks|dkrLtjd|ds1|d|d r  fd} fd}n fd} fd}d|vr|n|S|dks |dks|dkr|dkr.t |ddz dkrt dnp|ddkrt d|dkrM t |d dz n#t$rt d!wxYwd"krt d#ndfd$}|St d%)&Nrr])rrz'"'r:-rz@-c3HK|D]}||VdSrr )r r/r0keys rr3z!prepare_predicate..selects:  88C==,JJJ  r$z@-='z@-!='c3PK|D]}|kr|V dSrri)r r/r0rjvalues rr3z!prepare_predicate..selects?  88C==E))JJJ  r$c3XK|D]#}|x} |kr|V$dSrri)r r/r0 attr_valuerjrls rselect_negatedz)prepare_predicate..select_negatedsI  "&((3--/J<uATATJJJ  r$z!=z\-?\d+$c3HK|D]}||VdSr)find)r r/r0rs rr3z!prepare_predicate..selects:  99S>>-JJJ  r$z.='z.!='z-='z-!='c3K|D]K}|D]3}d|kr|Vn4LdSNr)r joinitertextr r/r0r"rrls rr3z!prepare_predicate..selectsn"""D!\\#..""771::<<00E99"&JJJ!E:""r$c3K|D]K}|D]3}d|kr|Vn4LdSrs)iterfindrtrurvs rroz)prepare_predicate..select_negated"sn"""D!]]3//""771::<<00E99"&JJJ!E:""r$c3tK|D]1}d|kr|V2dSrsrtrur r/r0rls rr3z!prepare_predicate..select)I"##Dwwt}}//588" ##r$c3tK|D]1}d|kr|V2dSrsrzr{s rroz)prepare_predicate..select_negated-r|r$z-()z-()-zXPath position >= 1 expectedlastzunsupported functionr6zunsupported expressionr(z)XPath offset from last() must be negativec3Kt|}|D]W} ||}t||j}||ur|VA#tt f$rYTwxYwdSr)r#listr r IndexErrorr)r r/rr0rbelemsindexs rr3z!prepare_predicate..selectEs'00J  '-F !9!9::EU|t++" "H-D  s=AA*)A*zinvalid predicate)r]appendrtrematchintr ValueError) rNr signature predicater3rorrjrrls @@@@rprepare_predicatersII # DFFEE    FF  8s??  H    8 (a! --q!B$'EqS)))q""" # ""IDl      Fi722l"             "&!2!2~~>CYq\ B Bl      EY&00 %  9#6#6HZ166$7l"   # " " " " " "  " " " " " " " # # # # # # # # # #"&!2!2~~>C9--f1D1D    ! %%)Eqyy!"@AAA|v%%!"8999F""@ ! --1EE!@@@%&>???@2::%&QRRR      ) * **s  $$6HH))rrX.z..z//[ceZdZdZdZdS)_SelectorContextNc||_dSr)r)selfrs r__init__z_SelectorContext.__init__`s  r$)__name__ __module__ __qualname__rrr*r$rrr^s(Jr$rcZ|dddkr|dz}|f}|r1|tt|z } t|}n.#t$r t tdkrt|dddkrtdtt||j } |}n#t$rYYdSwxYwg} | t|d||n#t$rtddwxYw |}|ddkr |}n#t$rYnwxYw|t|<YnwxYw|g}t|}|D]} | ||}|S) Nr:/rXdrz#cannot use absolute path on elementrz invalid path)tuplesorteditems_cacherrAclearrrr__next__r]ropsr) r0pathr cache_keyselectorrNrr/r r3s rrxrxhs  BCCyCczI7U6*"2"2"4"455666 %)$ %%% v;;   LLNNN 8s??CDD DOD*5566? DFFEE    FFF   <E!H dE : :;;;;  < < <!.11t; < 8s?? DFFE      %y-%0VFt$$G))(( Mss AA;F C! F! C0+F/C00F7/D'&F'EF E'&F' E41F3E44FFc@tt|||dSr)rNrxr0rrs rrqrqs tZ00$ 7 77r$c>tt|||Sr)rrxrs rr r s tZ00 1 11r$c tt|||}|jdS|jS#t$r|cYSwxYwrs)rNrxtextr])r0rdefaultrs rfindtextrsYHT44455 9 2y s%00 ??r)NN)rcompiler rr#r,rCrOrSrVr^rcrrrrrxrqr rr*r$rrstv RZ    ----0000&&&R&  >   n+n+n+b        ''''X8888 2222 r$PK!xTK""*__pycache__/ElementInclude.cpython-311.pycnu[ !A?hddlZddlmZddlmZdZedzZedzZdZGd d e Z Gd d e Z dd Z ddefdZ dZdS)N) ElementTree)urljoinz!{http://www.w3.org/2001/XInclude}includefallbackceZdZdS)FatalIncludeErrorN__name__ __module__ __qualname__E/opt/alt/python-internal/lib64/python3.11/xml/etree/ElementInclude.pyr r CDrr ceZdZdS)LimitedRecursiveIncludeErrorNr rrrrrGrrrc4|dkrOt|d5}tj|}dddn #1swxYwYnB|sd}t|d|5}|}dddn #1swxYwY|S)NxmlrbzUTF-8r)encoding)openrparsegetrootread)hrefrrfiledatas rdefault_loaderr!Ws ~~ $   5$T**2244D 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 H $h / / / 499;;D                Ks#'A  AA,B  BBc|d}n|dkrtd|zt|dr|}|t}t ||||t dS)Nrz;expected non-negative depth or None for 'max_depth', got %rr) ValueErrorhasattrrr!_includeset)elemloaderbase_url max_depths rrrtsv QVYbbccctY||~~ ~ T68Y66666rcNd}|t|kr||}|jtkr|d}|rt ||}|dd}|dkr||vrt d|z|dkrt d|z|||||} | t d|d|tj| } t| |||d z || ||j r| j pd |j z| _ | ||<n|d kr}||||d } | t d|d||j r | |j z } |r||d z } | j pd | z| _ n|j pd | z|_ ||=t d |z|jtkrt d|jzt||||||d z }|t|k dSdS)Nrrrrzrecursive include of %sz5maximum xinclude depth reached when including file %sz cannot load z as rtextrz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r))lentagXINCLUDE_INCLUDEgetrr raddcopyr&removetailr.XINCLUDE_FALLBACK) r(r)r*r+ _parent_hrefsierrnoder.s rr&r&s A c$ii-- G 5$ $ $55==D /x..EE'5))E~~=((+,E,LMMM>>6ORVVXXX!!$'''vdE**<++26$$>yvtY]MJJJ$$T***6;!%bAF :DIQ&vdE155+<+<==<++26$$>6#AFND9!9D!%bD 8DII!%bD 8DIG'?%GU' ' '#BQUJ  Q)] C C C Qg c$ii------r)N)r4r-r urllib.parserXINCLUDEr1r7DEFAULT_MAX_INCLUSION_DEPTH SyntaxErrorr rr!rr&rrrr@sf  .i'z)               #4      :1 7 7 7 766666rPK!\T@$__pycache__/__init__.cpython-313.pycnu[ MiEg)Nr9/opt/alt/python313/lib64/python3.13/xml/etree/__init__.pyrsrPK!PXX0__pycache__/ElementInclude.cpython-313.opt-2.pycnu[ Mi(SSKrSSKJr SSKJr Sr\S-r\S-rSr"S S \ 5r "S S \ 5r SS jr SS\4Sjr Srg)N) ElementTree)urljoinz!{http://www.w3.org/2001/XInclude}includefallbackc\rSrSrSrg)FatalIncludeErrorCN__name__ __module__ __qualname____firstlineno____static_attributes__r ?/opt/alt/python313/lib64/python3.13/xml/etree/ElementInclude.pyr r Crr c\rSrSrSrg)LimitedRecursiveIncludeErrorGr Nr r rrrrGrrrc*US:Xa;[US5n[R"U5R5nSSS5 U$U(dSn[USUS9nUR 5nSSS5 U$!,(df  W$=f!,(df  W$=f)NxmlrbzUTF-8r)encoding)openrparsegetrootread)hrefrrfiledatas rdefault_loaderr%Ws ~ $ $$T*224D K H $h /499;D0 K  K0 / Ks%A1B1 B BcUcSnOUS:a[SU-5e[US5(aUR5nUc[n[ XX#[ 55 g)Nrz;expected non-negative depth or None for 'max_depth', got %rr ) ValueErrorhasattrr r%_includeset)elemloaderbase_url max_depths rrrusV QVYbbcctY||~ ~ T86rcdSnU[U5:GaXnUR[:XGaURS5nU(a [ X'5nURSS5nUS:XaXt;a[ SU-5eUS:Xa[ SU-5eURU5 U"Xx5n U c[ SU<SU<35e[R"U 5n [XXsS - U5 URU5 UR(a'U R=(d S UR-U l XU'OUS :XaU"XxURS 55n U c[ SU<SU<35eUR(aXR- n U(a%XS - n U R=(d S U -U l OUR=(d S U -Ul X GM[ S U-5eUR[:Xa[ SUR-5e[XaX#U5 US - nU[U5:aGMgg)Nrr"rrzrecursive include of %sz5maximum xinclude depth reached when including file %sz cannot load z as rtextrz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r))lentagXINCLUDE_INCLUDEgetrr raddcopyr*removetailr2XINCLUDE_FALLBACK) r,r-r.r/ _parent_hrefsier"rnoder2s rr*r*s A c$i- G 55$ $55=Dx.EE'5)E~(+,E,LMM>6ORVVXX!!$'d*<+26>yyt]MJ$$T*66!%bAFF :DIQ&d155+<=<+26>66FFND!9D!%bD 8DI!%bD 8DIG'?%GUU' '#BQUUJ  Q] C Qg c$i--r)N)r8r1r urllib.parserXINCLUDEr5r;DEFAULT_MAX_INCLUSION_DEPTH SyntaxErrorr rr%rr*r rrrDsff  .i'z)     #4 <1 76rPK!\T@*__pycache__/__init__.cpython-313.opt-1.pycnu[ MiEg)Nr9/opt/alt/python313/lib64/python3.13/xml/etree/__init__.pyrsrPK!r9S?r:\r;SS@K<7 SSAK)r3r"r*idr6s r(__repr__Element.__repr__s&4>>#:#:DHHbh"OOOr'c$URX5$N)r3)r6r*r4s r( makeelementElement.makeelements~~c**r'cURURUR5nURUlURUlXSS&U$r@)rAr*r4texttail)r6elems r(__copy__Element.__copy__s>$++6II II Q r'c,[UR5$r@)lenr5r<s r(__len__Element.__len__s4>>""r'cf[R"S[SS9 [UR5S:g$)NzTesting an element's truth value will always return True in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. stacklevelr)warningswarnDeprecationWarningrJr5r<s r(__bool__Element.__bool__s1  K 1   4>>"a''r'c URU$r@r5r6indexs r( __getitem__Element.__getitem__s~~e$$r'c[U[5(aUHnURU5 M OURU5 X RU'gr@)r0slice_assert_is_elementr5)r6rYr,elts r( __setitem__Element.__setitem__sC eU # #'',  # #G , 'ur'cURU gr@rWrXs r( __delitem__Element.__delitem__s NN5 !r'c\URU5 URRU5 gr@r^r5appendr6 subelements r(rgElement.appends$  + j)r'cnUH/nURU5 URRU5 M1 gr@rf)r6elementsr,s r(extendElement.extends.  G  # #G , NN ! !' * r'c\URU5 URRX5 gr@)r^r5insert)r6rYris r(rpElement.inserts"  + e0r'cp[U[5(d![S[U5R-5egNzexpected an Element, not %s)r0 _Element_Pyr2typer")r6es r(r^Element._assert_is_elements1![))9DG)r3r"rDr<s r(r=QName.__repr__s NN33TYY??r'c,[UR5$r@)hashrDr<s r(__hash__QName.__hash__sDIIr'c|[U[5(aURUR:*$URU:*$r@r0rrDr6others r(__le__ QName.__le__1 eU # #99 * *yyE!!r'c|[U[5(aURUR:$URU:$r@rrs r(__lt__ QName.__lt__1 eU # #99uzz) )yy5  r'c|[U[5(aURUR:$URU:$r@rrs r(__ge__ QName.__ge__rr'c|[U[5(aURUR:$URU:$r@rrs r(__gt__ QName.__gt__rr'c|[U[5(aURUR:H$URU:H$r@rrs r(__eq__ QName.__eq__rr'rr@)r"r#r$r%r8rr=rrrrrrr&r!r'r(rrs0 @"!"!"r'rc\rSrSrSSjrSrSrSSjrSSjrSSjr SS jr SS jr SS jr SS S .Sjjr SrSrg)riNcUb1[U5(d![S[U5R-5eXlU(aUR U5 ggrs)r r2rur"_rootr )r6r,files r(r8ElementTree.__init__ sM  y'9'99 M2234 4  JJt  r'cUR$r@rr<s r(getrootElementTree.getroots zzr'cr[U5(d![S[U5R-5eXlgrs)r r2rur"r)r6r,s r(_setrootElementTree._setroots6!!9"7m4456 6 r'c(Sn[US5(d[US5nSnUcU[5n[US5(a:URU5UlURU(aUR 5 $$UR S5=n(a+URU5 UR S5=n(aM+UR 5UlURU(aUR 5 $$!U(aUR 5 ff=f)NFreadrbT _parse_wholei)r+openrrrcloserfeed)r6sourceparser close_sourcedatas r(r ElementTree.parse%s vv&&&$'FL ~"6>22 "(!4!4V! C77Dc8URRU5$r@)rrr6r*s r(rElementTree.iterGszzs##r'cUSSS:Xa"SU-n[R"SU-[SS9 URR X5$Nr/.zThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rrNrO)rQrR FutureWarningrr|r}s r(r|ElementTree.findSsO 8s?:D MM-/34!   zzt00r'cUSSS:Xa"SU-n[R"SU-[SS9 URR XU5$r)rQrRrrrrs r(rElementTree.findtextisS 8s?:D MM-/34!   zz""4*==r'cUSSS:Xa"SU-n[R"SU-[SS9 URR X5$r)rQrRrrrr}s r(rElementTree.findallsQ 8s?:D MM-/34!   zz!!$33r'cUSSS:Xa"SU-n[R"SU-[SS9 URR X5$r)rQrRrrrr}s r(rElementTree.iterfindsQ 8s?:D MM-/34!   zz""444r'Tshort_empty_elementsc URc [S5eU(dSnOU[;a[SU-5eU(d US:XaSnOSn[ X5upxUS:Xa?U(d+Uc5UR 5S:wa!UR 5S;a U"S U<S 35 US :Xa[ XpR5 O3[URU5up[Un U "XpRXUS 9 SSS5 g!,(df  g=f) NzElementTree not initializedxmlzunknown method %rc14nutf-8us-asciiunicode)rrz rDr)rr2 _serialize ValueError _get_writerlower_serialize_text _namespaces) r6file_or_filenameencodingxml_declarationdefault_namespacemethodrwritedeclared_encodingqnamesr serializes r(r ElementTree.writes: :: 9: :F : %069: :"% ) 48RO$,^^%2&,,.6KK%()zz2%0=N%O"&v. %V/CE5 4 4s BC88 Dc"URUSS9$)Nr)r )r )r6rs r( write_c14nElementTree.write_c14nszz$vz..r'rrr@)NNNN)r"r#r$r%r8rrr rr|rrrr rr&r!r'r(rrsU  D $1,>,4,5." $ 5E $( 5En/r'rc## URnUR5S:XaU[USS5=(d S4v g[R"5n[ U[ R5(aUnO[ U[ R5(a2[ R"U5nURUR5 OF[ R"5nSUl X$lURUl URUl[ R "UUSSS9nURUR5 URU4v SSS5 g![a NWf=f!,(df  g=f![aP UR5S:XaSn[#USUSS 9nURU4v SSS5 g!,(df  g=ff=f7f) Nrr rcgNTr!r!r'r(_get_writer.. sDr'xmlcharrefreplace )r errorsnewlinew)r r)r rgetattr contextlib ExitStackr0ioBufferedIOBase RawIOBaseBufferedWritercallbackdetachwritableseekabletellAttributeError TextIOWrapperr)rr r stackrs r(rrs-+ && >> y (!1:tDOO O%%'5.0A0ABB+D 0",,??,,-=>DNN4;;/,,.D$0DM!&J)9(A(A $4$9$9 ''19/B046 t{{+jj(**9('&*'(' ' >> y (H "C(,.15**h& &.... 'sG E:AGBE),"EAE) G E&#E)%E&&E)) E73G:,G&G7G?G G GGGGc^^^SS0m0mT(aSTT'UUU4SjnUR5GHXnURn[U[5(a#URT;aU"UR5 OD[U[ 5(aUT;aU"U5 O UbU[ LaU[La [U5 UR5HoupE[U[5(a URnUT;aU"U5 [U[5(dMKURT;dM]U"UR5 Mq URn[U[5(dGM3URT;dGMFU"UR5 GM[ TT4$)Ncj>USSS:XavUSSRSS5upTRU5nUc1[RU5nUcS[T5-nUS:waUTU'U(a U<SU<3TU'gUTU'gT(a [ S5eUTU'g![ a [ U5 gf=f)Nrrrzns%dr:z.add_qname&s .RayC 9++C3#,>+//4F~!'#j/!9*0 3/5s$;F5M$'F5M$$3!&u  . &u - .sA8B<BBB21B2) rr*r0rrDrrr r4r) rFr r8r*rrrDrrs ` @@r(rrs7D\FJ(* $%.8 hh c5 ! !xxv%#((# S ! !& # _G!32 &s +**,JC#u%%hh& #%''EJJf,D%**% 'yy dE " "tyy'> dii '( : r'c URnURnU[La U"SU-5 GOU[La U"SU-5 GOX&nUc/U(aU"[ U55 UHn[ XUSUS9 M GOYU"SU-5 [ UR55n U (dU(aU(aH[UR5SS9H+upU (aSU -n U"SU <S [U 5<S 35 M- U Hhup[U [5(a U Rn [U [5(aX*Rn O [U 5n U"S X+<S U <S 35 Mj U(d[U5(dU(dDU"S 5 U(aU"[ U55 UHn[ XUSUS9 M U"S U-S -5 OU"S5 UR(aU"[ UR55 gg)N rrc US$Nrr!xs r(r _serialize_xml..nQqTr'rr1 xmlns=""rr)r*rDrr _escape_cdata_serialize_xmllistrsorted_escape_attribr0rrJrE) r rFrrrkwargsr*rDrvrvks r(rIrIXs ((C 99D g~ kD ! % % hok ;mD)*u4HJ #) &E  &z'7'7'9+9!; #aA*1- !;"DA!!U++FF!!U++"66N*1-&)Q78"s4yy(<c --.A"5VT8LNdSj3&'e  yy mDII&'r'>brhrcolimgwbrareabaselinkmetaembedframeinputparamtrackrisindexbasefontc <URnURnU[LaU"S[U5-5 GOU[LaU"S[U5-5 GOX%nUc0U(aU"[U55 UHn[ XUS5 M GObU"SU-5 [ UR55nU(dU(aU(aH[UR5SS9H+upU (aSU -n U"SU <S[U 5<S 35 M- UHhup[U [5(a U Rn [U [5(aX)Rn O [U 5n U"S X*<SU <S 35 Mj U"S 5 UR5n U(a&U S :XdU S :Xa U"U5 OU"[U55 UHn[ XUS5 M U [;aU"SU-S -5 UR(aU"[UR55 gg)Nr;r<rc US$r>r!r?s r(r!_serialize_html..rBr'rCr1rDrErFrrscriptstylerG)r*rDrrHr_serialize_htmlrJrrKrLr0r_escape_attrib_htmlr HTML_EMPTYrE) r rFrrrMr*rDrvrrNrOltags r(reres ((C 99D g~ kM$//0 % % ht,,-k ;mD)*&$7 #) &E  &z'7'7'9+9!; #aA*1- !;"DA!!U++FF!!U++"66N/2&)Q78" #J99;D8#tw$K--.&$7:%dSj3&' yy mDII&'r'cUR5H nU"U5 M UR(aU"UR5 ggr@)rrE)r rFparts r(rrs1  d   yy diir')rhtmlrDc[R"SU5(a [S5e[[R 55Hup#X!:XdX0:XdM[U M U[U'g)Nzns\d+$z'Prefix format reserved for internal use)rematchrrJr3r)r7r6rOrNs r(rrsX xx 6""BCC^))+, 8q{q!-!N3r'rrkrdfwsdlxsxsidc)$http://www.w3.org/XML/1998/namespacezhttp://www.w3.org/1999/xhtmlz+http://www.w3.org/1999/02/22-rdf-syntax-ns#z http://schemas.xmlsoap.org/wsdl/z http://www.w3.org/2001/XMLSchemaz)http://www.w3.org/2001/XMLSchema-instancez http://purl.org/dc/elements/1.1/cP[SU<S[U5R<S35e)Nzcannot serialize z (type ))r2rur"rs r(r4r4s! +/d1D1DE  r'cSU;aURSS5nSU;aURSS5nSU;aURSS5nU$![[4a [U5 gf=f)N&&r<r>replacer2r+r4rs r(rHrHso ) $;<<W-D $;<<V,D $;<<V,D ~ &)"4()A A A*)A*cSU;aURSS5nSU;aURSS5nSU;aURSS5nSU;aURSS5nS U;aURS S 5nS U;aURS S 5nS U;aURS S5nU$![[4a [U5 gf=f)Nrxryrrzrr{rF" z rz  z r|rs r(rLrLs) $;<<W-D $;<<V,D $;<<V,D 4<<<h/D 4<<<g.D 4<<<g.D 4<<<g.D ~ &)"4()sB)B,,C  C cSU;aURSS5nSU;aURSS5nSU;aURSS5nU$![[4a [U5 gf=f)Nrxryrr{rFrr|rs r(rfrf"sm ) $;<<W-D $;<<V,D 4<<<h/D ~ &)"4()r~T)r r rc US:Xa[R"5O[R"5n[U5R XaUUUUS9 UR 5$)Nrr r r r)r"StringIOBytesIOrr getvalue)r,r r r r rstreams r(rr1sT ')3R[[]Fv/>1B&,4H J ?? r'c2\rSrSrSrSrSrSrSrSr g) _ListDataStreamiIcXlgr@lst)r6rs r(r8_ListDataStream.__init__Ksr'cgrr!r<s r(r(_ListDataStream.writableNr'cgrr!r<s r(r)_ListDataStream.seekableQrr'c:URRU5 gr@)rrg)r6bs r(r _ListDataStream.writeTs r'c,[UR5$r@)rJrr<s r(r*_ListDataStream.tellWs488}r'rN) r"r#r$r%r8r(r)r r*r&r!r'r(rrIsr'rc X/n[U5n[U5RXqUUUUS9 U$)Nr)rrr )r,r r r r rrrs r(rrZsA C S !Fv/>1B&,4H J Jr'c[U[5(d [U5nUR[RSS9 UR 5R nU(a USS:wa [RRS5 gg)Nr)r r)r0rr sysstdoutrrE)rFrEs r(rrgse dK ( (4 JJszzIJ. <<>  D 48t# $r'c^^^[U[5(aUR5nUS:a[SU35e[ U5(dgSUT--/mUUU4SjmT"US5 g)Nrz,Initial indentation level must be >= 0, got rc>US-nTUnUR(aURR5(dX0lUHSn[ U5(aT"XB5 UR (a!UR R5(aMMX4lMU WR R5(d TUUlgg![a TUT-nTRU5 Nf=fr>) IndexErrorrgrDstriprJrE)rFlevel child_levelchild_indentationchild_indent_children indentationsspaces r(r indent.._indent_childrensai  3 ,[ 9  yy  1 1)IE5zz 4::UZZ%5%5%7%7. zz!!%e,EJ" 3 ,U 3e ;     1 2 3sC#C-,C-)r0rrrrJ)treerrrrs ` @@r(rrzsg$ $$||~ qyGwOPP t9955=()L-,T1r'c<[5nURX5 U$r@)rr )rrrs r(r r s =DJJv Kr'c^^^^^ [XS9m[TS5(d[TS5mSmOSmUUU 4SjnU"T5m"UUU4SjS[RR 5nU"5nSUl[R"U5m U$) N)events_parserrrTFc3|># TR5ShvN URS5nU(dOTRU5 MDTR5nTR5ShvN T"5nUbX#lT(aUR 5 ggNN/!T(aUR 5 ff=f7f)Ni@) read_eventsrr_close_and_return_rootrootr)rrritr pullparserwrs r(iteratoriterparse..iterators %11333{{9-% 446D!--/ / /B~ 4 0  s?B<BBAB-B.BB<BBB99B<cN>\rSrSrYRrUUU4SjrUU4SjrSrg)$iterparse..IterParseIteratoricT>T(aTR5 TR5 gr@r)r6rgenrs r(r*iterparse..IterParseIterator.closes  IIKr'c6>T(aTR5 ggr@r)r6rrs r(__del__,iterparse..IterParseIterator.__del__s r'r!N)r"r#r$r%__next__rrr&)rrrsr(IterParseIteratorrs<<    r'r) rr+r collectionsabcIteratorrweakrefref) rrrrrrrrrrs ` @@@@r(r r s"f=J 66 " "fd#  $ 6 C  KOO44   BBG RB Ir'cD\rSrSrS SS.SjjrSrSrSrSrS r S r g) riN)rc[R"5UlU=(d [[ 5S9UlUcSnUR R URU5 g)Nr)end)rdeque _events_queuerrr _setevents)r6rrs r(r8XMLPullParser.__init__sL )..0A);="A >F  2 2F;r'cURc [S5eU(aURRU5 gg![a%nURR U5 SnAgSnAff=f)Nz!feed() called after end of stream)rrr SyntaxErrorrrg)r6rexcs r(rXMLPullParser.feed s` << @A A  / !!$'  /""))#.. /s> A-A((A-cHURR5nSUlU$r@)rr)r6rs r(r$XMLPullParser._close_and_return_roots ||!!#  r'c$UR5 gr@)rr<s r(rXMLPullParser.closes ##%r'c## URnU(a5UR5n[U[5(aUeUv U(aM4gg7fr@)rpopleftr0 Exception)r6revents r(rXMLPullParser.read_events#s? ##NN$E%++  fs AA  A chURc [S5eURR5 g)Nz"flush() called after end of stream)rrflushr<s r(rXMLPullParser.flush1s( << AB B r')rrr@) r"r#r$r%r8rrrrrr&r!r'r(rrs' r'cU(d[[5S9nURU5 UR5n0nUR 5H!nUR S5nU(dMXCU'M# X#4$)Nrr;)rrrrrr)rDrridsrFr;s r(rrHsb +-0 KK <<>D C  XXd^ 2G 9r'cU(d[[5S9nUHnURU5 M UR5$rr)sequencerrDs r(rr`s5 +-0 D <<>r'c`\rSrSrSSSSSS.SjjrSrSrSrS rS r S r SS jr S r Sr g)rirNF)comment_factory pi_factoryinsert_comments insert_pisc/Ul/UlSUlSUlSUlUc[ nX lX@lUc[nX0l XPl Uc[nXl gr@) _data_elem_lastr_tailr_comment_factoryrr _pi_factoryrr_factory)r6element_factoryrrrrs r(r8TreeBuilder.__init__sd      "%O /.  .J%$  "%O' r'cUR$r@rr<s r(rTreeBuilder.closeszzr'cUR(abURbMSRUR5nUR(aXRlOXRl/UlggNr/)rrjoinrrErDr6rDs r(_flushTreeBuilder._flushsL ::zz%wwtzz*::&*JJO'+JJODJ r'c:URRU5 gr@)rrgr6rs r(rTreeBuilder.datas $r'c UR5 URX5=UlnUR(aURSR U5 OUR cX0lURR U5 SUlU$)Nrr)rrrrrgrr)r6r*attrsrFs r(startTreeBuilder.startsl  MM#55 T :: JJrN ! !$ ' ZZ J $  r'cUR5 URR5UlSUlUR$r>)rrpoprrrs r(rTreeBuilder.ends2 ZZ^^%  zzr'cPURURURU5$r@)_handle_singlerrrs r(commentTreeBuilder.comments* ""  ! !4#7#7? ?r'cPURURURX5$r@)r rr)r6rrDs r(piTreeBuilder.pis( ""   doov= =r'cU"U6nU(aLUR5 X@lUR(aURSRU5 SUlU$)Nrr)rrrrgr)r6factoryrpargsrFs r(r TreeBuilder._handle_singlesE~  KKMJzz 2%%d+DJ r') rrrrrrrrrrr@)r"r#r$r%r8rrrrrr rr r&r!r'r(rrrs>((!%$!&5((  " ?=r'rcf\rSrSrSSS.SjrSrSrSrSrS r S r S r S r S r SrSrSrg)riN)rr cSSKJn UR US5nUc [ 5nU=UlUlU=UlUl URUl 0Ul URUl[US5(aUR Ul[US5(aUR$Ul[US5(aUR(Ul[US5(aUR,Ul[US 5(aUR0Ul[US 5(aUR4Ul[US 5(aUR8UlS UlS UlSUl 0Ul!S URD-Ul#g![a" SSKnGN![a [S5ef=ff=f![Ha gf=f)Nrexpatz7No module named expat; use SimpleXMLTreeBuilder insteadrrrstart_nsend_nsrr rrzExpat %d.%d.%d)% xml.parsersr ImportErrorpyexpat ParserCreaterrrr_targeterror_error_names_defaultDefaultHandlerExpandr+_startStartElementHandler_endEndElementHandler _start_nsStartNamespaceDeclHandler_end_nsEndNamespaceDeclHandlerrCharacterDataHandlerr CommentHandlerrProcessingInstructionHandler buffer_textordered_attributes_doctypeentity version_infoversionr+)r6rr rrs r(r8XMLParser.__init__s  )##Hc2 > ]F%++ dl%++ dlkk  &*mm# 67 # #)-F & 65 ! !'+yyF $ 6: & &/3~~F , 68 $ $-1\\F * 66 " "*0++F ' 69 % %$*NNF ! 64 28))F /$%!   +e.@.@@DLM  ' !M  N   s/F 7F; F8FF44F8; GGcBURnURnUGHnUS:Xa SUlXTUR4SjnXclM*US:XaXTUR 4SjnXclMIUS:Xa;[URS5(aXTUR4SjnOXT4S jnXcl MUS :Xa;[URS 5(aXTUR4S jnOXT4S jnXcl MUS:XaXTU4SjnXcl MUS:XaXTU4SjnXclM[SU-5e g)Nrrc"U"X$"X545 gr@r!)r* attrib_inrrgrs r(handler%XMLParser._setevents..handler/sE5#89:r'rc"U"X"U545 gr@r!)r*rrgrs r(r9r:4sE3s8,-r'zstart-nsrc"U"X$"X545 gr@r!)r7r6rrgrs r(r9r:;sx'<=>r'c>U"X =(d SU=(d S445 grr!)r7r6rrgs r(r9r:?s "ciR'@ABr'zend-nsrc"U"X"U545 gr@r!)r7rrgrs r(r9r:Esvf~67r'cU"US45 gr@r!)r7rrgs r(r9r:Ist}-r'r cHU"XRRU545 gr@)rr )rDrrgr6s r(r9r:MsE;;#6#6t#<=>r'rcHU"X$RRX545 gr@)rr) pi_targetrrrgr6s r(r9r:QsE;;>>)#BCDr'zunknown event %r)rrgr0r$r%r&r'r+rr(r)r*r+r-r.r)r6 events_queueevents_to_reportrrg event_namer9s r(rXMLParser._setevents#s$$*JW$,-)2<"&++;.5*u$'1 $ .,3(z)4;; 333=)-?4>C3:0x'4;;11.8'+||8/9.18.y((2?(/%t#3=!%E7>3 !3j!@AAU+r'cx[U5nURUlURUR4UlUer@)r codelinenooffsetposition)r6rerrs r( _raiseerrorXMLParser._raiseerrorXs0::||U\\1  r'c~URUnU$![a UnSU;aSU-nX RU'U$f=f)Nrr)r!KeyError)r6rnames r(_fixnameXMLParser._fixname^sS $;;s#D   $Dd{Tz#KK   $s %<<c^URRU=(d SU=(d S5$r)rrr6r7r6s r(r(XMLParser._start_nsis!{{##FLb#)<A??B BczURR5nURRS5 URRSS5 URRU5 g!URanUR U5 SnANBSnAff=f!URRU5 f=f)NFr')rGetReparseDeferralEnabledSetReparseDeferralEnabledrrr rM)r6 was_enabledrNs r(rXMLParser.flushskk;;=  ? KK 1 1% 8 KK  c5 ) KK 1 1+ >{{   Q    KK 1 1+ >s)7A//B?BBBBB:) r1r r!rrr2rrr4)r"r#r$r%r8rrMrRr(r*r$r&r"rrrr&r!r'r(rrsI"&+Z3Bj =0 .34%l *"?r'r)out from_filec UcUc [S5eSnUc[R"5=pA[[ UR 40UD6S9nUb"UR U5 UR5 O Ub [X%S9 UbUR5$S$)Nz:Either 'xml_data' or 'from_file' must be provided as inputr)r) rr"rrrr rrr r)xml_datar|r}optionssiors r(rrsI-UVV C {KKM! .syyDGD EF H    i' _3<<>6$6r'z ^\w+:\w+$c\rSrSrSSSSSSSS.Sjr\4SjrSrSSjrS r S R4S jr S r S r SSjrSrSrSrSrg)riFN) with_comments strip_textrewrite_prefixesqname_aware_tagsqname_aware_attrs exclude_attrs exclude_tagsc\Xl/UlX lX0lU(a [ U5OSUlU(a [ U5OSUlX@lU(a[ U5UlOSUlU(a[ U5RUl OSUl S//Ul /Ul U(d6URR[[R!555 URR/5 0UlS/UlSUlSUlSUlSUlg)N)rtrFr)_writer_with_comments _strip_textr_exclude_attrs _exclude_tags_rewrite_prefixes_qname_aware_tags intersection_find_qname_aware_attrs_declared_ns_stack _ns_stackrgrJr3r _prefix_map_preserve_space_pending_start _root_seen _root_done_ignored_depth) r6r rrrrrrrs r(r8C14NWriterTarget.__init__s  +%4Ac-0t2>S.D!1 %()9%:D "%)D " +./@+A+N+ND (+/D ( <$ #  NN ! !$~';';'="> ? b! %w"r'c#T# U"U5HnU(dM UShvN M gN 7fr@r!)r6ns_stack _reversedrs r(_iter_namespaces!C14NWriterTarget._iter_namespaces5s%#H-Jz%%%.%s((& (cURSS5up#URUR5HupEXR:XdM SUSU3s $ [SUSUS35e)Nr1rrrzPrefix z of QName "" is not declared in scope)splitrrr)r6 prefixed_namer7rQr6ps r(_resolve_prefix_name%C14NWriterTarget._resolve_prefix_name:sf$**32 ++DNN;FC{C54&))<76(+m_D^_``r'cUc%USSS:XaUSSRSS5OSU4up#OUn[5nURUR5H4upVXR:XaXd;aU(aUSU3OUX24s $UR U5 M6 UR (amX R ;aUR UnO&S[UR 53=o`R U'URSRX&45 USU3X24$U(d SU;aX3U4$URUR5H=upVXR:XdM URSRX&45 U(aUSU3OUX24s $ U(dX3U4$[SUS 35e) Nrrrr/r1rmrz Namespace "r) r2rrraddrrrJrgrr)r6r5r6r* prefixes_seenur7s r(_qnameC14NWriterTarget._qnameAs ;38!93CuQRy''Q/"eHCC ..t/F/FGIAxF7,2&3%(SEE   f %H  ! !&&&))#.34S9I9I5J4K1LL))#.  # #B ' . .} =XQse$c. .r.S= ..t~~>IAx''+22C=A,2&3%(SEE? S= ;se+EFGGr'c^UR(dURRU5 ggr@)rrrgrs r(rC14NWriterTarget.datafs""" JJ  d ##r'r/cU"UR5nURSS2 UR(a$URS(dUR5nURbFURSso0lU(a[ U5(aUOSnUR "/UQUP76 UbgU(a-UR(aUR[U55 gggNr) rrrrr_looks_like_prefix_namer$rr_escape_cdata_c14n)r6 _join_textrr qname_texts r(rC14NWriterTarget._flushjs$**% JJqM   D$8$8$<::) rrrrrrgrrr$)r6r*rnew_namespacess r(rC14NWriterTarget.starts    )##s.@.@'@   1 $   :: KKM &&~6  ! ! -#9O9O2O#&~">D   C/r'cURb<U(a5UR5VVs0sHupVXPR;dMXV_M nnnU1Ukn0nUb&URU5=oU'URU 5 URbhU(aaUR U5n U (aFU H?n X+n [ U 5(dMURU 5=oU 'URU 5 MA OSn OSn UR n [USS9Vs0sH oU "U5_M nnU(a6UVVs/sHunnU(aSU-OSU4PM nnnUR5 O/nU(a][UR55H@upVU bXZ;aXh;a XUSnXunn nURU(aUOU U45 MB URS5nURRU(aUS:HOURS5 URnU"S XS-5 U(a<U"S RUVVs/sHupVS US [U5S 3PM snn55 U"S5 UbU"[XUS55 SUlUR"R/5 gs snnfs snfs snnfs snnf)Nc&URSS5$)Nrr)r)rms r(r)C14NWriterTarget._start..s!''#q/r'rCzxmlns:xmlnsrz+{http://www.w3.org/XML/1998/namespace}spacepreserverrr/rrErFrT)rrrrrrrrKsortrgrrrr_escape_attrib_c14nrrr)r6r*rrrrOrNrresolved_namesr5qattrs attr_namer parse_qnamerm parsed_qnamesr6r7r[ attr_qnamespace_behaviourr s r(r$C14NWriterTarget._starts    *u&+kkmTmdaq@S@S7STQTmET  !151J1J:1V VE:. JJu   ' ' 311%8F!'I!,E.u558<8Q8QRW8XXu 5 5) "( Fkk 4: 153453qKN*53 4 $2#1KC'-F"'3?#1  NN I u{{}-%!+!:M%Q&78;A-:-=* Is  *A!FG . ))$QR ##-)rrrrrrrrrs r(r C14NWriterTarget.commentsw""      ?? KK  __ KKM d-d34C89 KK r'ctUR(agUR(aURS5 O2UR(a!UR(aUR 5 URU(aSUS[ U5S3OSUS35 UR(dURS5 gg)Nrz)rrrrrrr)r6rrs r(rC14NWriterTarget.pis     ?? KK  __ KKM :>b,T232 6bPRO U KK r')rrrrrrrrrrrrrrrrrr@)r"r#r$r%r8reversedrrrrrrrrr$rr rr&r!r'r(rrse. %"&$#$# J4<& a#HJ$!# 210"C"J   r'rc SU;aURSS5nSU;aURSS5nSU;aURSS5nSU;aURSS5nU$![[4a [U5 gf=f) Nrxryrrzrr{r r|rs r(rrs) $;<<W-D $;<<V,D $;<<V,D 4<<<g.D ~ &)"4()sA!A$$BBcjSU;aURSS5nSU;aURSS5nSU;aURSS5nSU;aURSS5nS U;aURS S 5nS U;aURS S 5nU$![[4a [U5 gf=f) NrxryrrzrFrrz rz rrr|rs r(rrs) $;<<W-D $;<<V,D $;<<X.D 4<<<g.D 4<<<g.D 4<<<g.D ~ &)"4()sBBB21B2)r)_set_factoriesr@r)z r)?__all__rrrmrQr"rcollections.abcr rr/rrr r rrrrr rrcontextmanagerrrrIrgrerrrr3r4rHrLrfrr#rrrrr r rrrrrrrrcompileUNICODErnrrrrrt _elementtreerrr!r'r(rs R (       # ^^B $&$  +"+"`b/b/N /+/+b;z0(d 0(d    !*-2$*38(.(,16(, %3! ) )8 )!T"&0b''" !%&* &/l <~77t",  $vvth?h?Z7tt7<**\2::>DDD)&). 3K+712  s# E::FFPK!xp[E[E'__pycache__/ElementTree.cpython-313.pycnu[ Mi#Sr/SQrSrSSKrSSKrSSKrSSKrSSKrSSKrSSK r SSK r SSK J r "SS\ 5rS r"S S 5r04S jrSCS jrSCSjr\r"SS5r"SS5r\ R.S5rSCSjrSr1SkrSrSr\\\S.rSrSSSSSS S!S".r \ \l S#r!S$r"S%r#S&r$SDSSS'S(.S)jjr%"S*S+\RL5r'SDSSS'S(.S,jjr(S-r)SES.jr*SCS/jr+SDS0jr,"S1S25r-SCS3jr.SCS4jr/\.r0SCS5jr1"S6S75r2"S8S95r3SCSSS:.S;jjr4\Rj"S<\Rl5Rnr8"S=S>5r9S?r:S@r;\rr> \>"\\5 g!\?a gf=f)FaLightweight XML support for Python. XML is an inherently hierarchical data format, and the most natural way to represent it is with a tree. This module has two classes for this purpose: 1. ElementTree represents the whole XML document as a tree and 2. Element represents a single node in this tree. Interactions with the whole document (reading and writing to/from files) are usually done on the ElementTree level. Interactions with a single XML element and its sub-elements are done on the Element level. Element is a flexible container object designed to store hierarchical data structures in memory. It can be described as a cross between a list and a dictionary. Each Element has a number of properties associated with it: 'tag' - a string containing the element's name. 'attributes' - a Python dictionary storing the element's attributes. 'text' - a string containing the element's text content. 'tail' - an optional string containing text after the element's end tag. And a number of child elements stored in a Python sequence. To create an element instance, use the Element constructor, or the SubElement factory function. You can also use the ElementTree class to wrap an element structure and convert it to and from XML. )CommentdumpElement ElementTree fromstringfromstringlistindent iselement iterparseparse ParseErrorPIProcessingInstructionQName SubElementtostring tostringlist TreeBuilderVERSIONXMLXMLID XMLParser XMLPullParserregister_namespace canonicalizeC14NWriterTargetz1.3.0N) ElementPathc\rSrSrSrSrg)r kzAn error when parsing an XML document. In addition to its exception value, a ParseError contains two extra attributes: 'code' - the specific exception code 'position' - the line and column of the error N)__name__ __module__ __qualname____firstlineno____doc____static_attributes__r!text...tail Nc [U[5(d#[SURR<35eXl0UEUEUl/Ulg)Nzattrib must be dict, not ) isinstancedict TypeError __class__r"r+attrib _children)selfr+r5extras r)__init__Element.__init__sM&$''  )),- -))5) r(c`SURRUR[U54-$)Nz<%s %r at %#x>)r4r"r+idr7s r)__repr__Element.__repr__s&4>>#:#:DHHbh"OOOr(c$URX5$)zCreate a new element with the same type. *tag* is a string containing the element name. *attrib* is a dictionary containing the element attributes. Do not call this method, use the SubElement factory function instead. )r4)r7r+r5s r) makeelementElement.makeelements~~c**r(cURURUR5nURUlURUlXSS&U$N)rAr+r5texttail)r7elems r)__copy__Element.__copy__s>$++6II II Q r(c,[UR5$rD)lenr6r=s r)__len__Element.__len__s4>>""r(cf[R"S[SS9 [UR5S:g$)NzTesting an element's truth value will always return True in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. stacklevelr)warningswarnDeprecationWarningrKr6r=s r)__bool__Element.__bool__s1  K 1   4>>"a''r(c URU$rDr6r7indexs r) __getitem__Element.__getitem__s~~e$$r(c[U[5(aUHnURU5 M OURU5 X RU'grD)r1slice_assert_is_elementr6)r7rZr-elts r) __setitem__Element.__setitem__sC eU # #'',  # #G , 'ur(cURU grDrXrYs r) __delitem__Element.__delitem__s NN5 !r(c\URU5 URRU5 g)zAdd *subelement* to the end of this element. The new element will appear in document order after the last existing subelement (or directly after the text, if it's the first subelement), but before the end tag for this element. Nr_r6appendr7 subelements r)rhElement.appends$  + j)r(cnUH/nURU5 URRU5 M1 g)z[Append subelements from a sequence. *elements* is a sequence with zero or more elements. Nrg)r7elementsr-s r)extendElement.extends.  G  # #G , NN ! !' * r(c\URU5 URRX5 g)z(Insert *subelement* at position *index*.N)r_r6insert)r7rZrjs r)rqElement.inserts"  + e0r(cp[U[5(d![S[U5R-5egNexpected an Element, not %s)r1 _Element_Pyr3typer")r7es r)r_Element._assert_is_elements1![))9DGrArHrLrUr[rardrhrnrqr_r{r~rrrrrrrrrrr'r!r(r)rr~s( C F1 D D$&P +#(%(" *+1 N * 8 E ; < % -!" ##,r(rc V0UEUEnURX5nURU5 U$)a|Subelement factory which creates an element instance, and appends it to an existing parent. The element tag, attribute names, and attribute values can be either bytes or Unicode strings. *parent* is the parent element, *tag* is the subelements name, *attrib* is an optional directory containing element attributes, *extra* are additional attributes given as keyword arguments. )rArh)parentr+r5r8r-s r)rrs4! % F  -G MM' Nr(c0[[5nXlU$)zComment element factory. This function creates a special element which the standard serializer serializes as an XML comment. *text* is a string containing the comment string. )rrrE)rEr-s r)rrsgGL Nr(cl[[5nXlU(aURS-U-UlU$)aProcessing Instruction element factory. This function creates a special element which the standard serializer serializes as an XML comment. *target* is a string containing the processing instruction, *text* is a string containing the processing instruction contents, if any.  )rrrE)targetrEr-s r)rrs1+,GL ||c)D0 Nr(cR\rSrSrSrSSjrSrSrSrSr S r S r S r S r S rg)riaQualified name wrapper. This class can be used to wrap a QName attribute value in order to get proper namespace handing on output. *text_or_uri* is a string containing the QName value either in the form {uri}local, or if the tag argument is given, the URI part of a QName. *tag* is an optional argument which if given, will make the first argument (text_or_uri) be interpreted as a URI, and this argument (tag) be interpreted as a local name. Nc2U(a SU<SU<3nXlg)N{}rE)r7 text_or_urir+s r)r9QName.__init__s &137K r(cUR$rDrr=s r)__str__ QName.__str__s yyr(cTSURR<SUR<S3$)N)r4r"rEr=s r)r>QName.__repr__s NN33TYY??r(c,[UR5$rD)hashrEr=s r)__hash__QName.__hash__sDIIr(c|[U[5(aURUR:*$URU:*$rDr1rrEr7others r)__le__ QName.__le__1 eU # #99 * *yyE!!r(c|[U[5(aURUR:$URU:$rDrrs r)__lt__ QName.__lt__1 eU # #99uzz) )yy5  r(c|[U[5(aURUR:$URU:$rDrrs r)__ge__ QName.__ge__rr(c|[U[5(aURUR:$URU:$rDrrs r)__gt__ QName.__gt__rr(c|[U[5(aURUR:H$URU:H$rDrrs r)__eq__ QName.__eq__rr(rrD)r"r#r$r%r&r9rr>rrrrrrr'r!r(r)rrs5  @"!"!"r(rc\rSrSrSrSSjrSrSrSSjrSSjr SS jr SS jr SS jr SS jr SS S.SjjrSrSrg)ria An XML element hierarchy. This class also provides support for serialization to and from standard XML. *element* is an optional root element node, *file* is an optional file handle or file name of an XML file whose contents will be used to initialize the tree with. NcUb1[U5(d![S[U5R-5eXlU(aUR U5 ggrt)r r3rwr"_rootr )r7r-files r)r9ElementTree.__init__ sM  y'9'99 M2234 4  JJt  r(cUR$)z!Return root element of this tree.rr=s r)getrootElementTree.getroots zzr(cr[U5(d![S[U5R-5eXlg)zReplace root element of this tree. This will discard the current contents of the tree and replace it with the given element. Use with care! ruN)r r3rwr"r)r7r-s r)_setrootElementTree._setroots6!!9"7m4456 6 r(c(Sn[US5(d[US5nSnUcU[5n[US5(a:URU5UlURU(aUR 5 $$UR S5=n(a+URU5 UR S5=n(aM+UR 5UlURU(aUR 5 $$!U(aUR 5 ff=f)aLoad external XML document into element tree. *source* is a file name or file object, *parser* is an optional parser instance that defaults to XMLParser. ParseError is raised if the parser fails to parse the document. Returns the root element of the given source document. FreadrbT _parse_wholei)r,openrrrcloserfeed)r7sourceparser close_sourcedatas r)r ElementTree.parse%s vv&&&$'FL ~"6>22 "(!4!4V! C77Dc8URRU5$)zCreate and return tree iterator for the root element. The iterator loops over all elements in this tree, in document order. *tag* is a string with the tag name to iterate over (default is to return all elements). )rrr7r+s r)rElementTree.iterGszzs##r(cUSSS:Xa"SU-n[R"SU-[SS9 URR X5$)a4Find first matching element by tag name or path. Same as getroot().find(path), which is Element.find() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found. Nr/.This search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rrOrP)rRrS FutureWarningrr~rs r)r~ElementTree.findSsO 8s?:D MM-/34!   zzt00r(cUSSS:Xa"SU-n[R"SU-[SS9 URR XU5$)a=Find first matching element by tag name or path. Same as getroot().findtext(path), which is Element.findtext() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found. NrrrrrOrP)rRrSrrrrs r)rElementTree.findtextisS 8s?:D MM-/34!   zz""4*==r(cUSSS:Xa"SU-n[R"SU-[SS9 URR X5$)a9Find all matching subelements by tag name or path. Same as getroot().findall(path), which is Element.findall(). *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return list containing all matching elements in document order. NrrrrrOrP)rRrSrrrrs r)rElementTree.findallsQ 8s?:D MM-/34!   zz!!$33r(cUSSS:Xa"SU-n[R"SU-[SS9 URR X5$)a?Find all matching subelements by tag name or path. Same as getroot().iterfind(path), which is element.iterfind() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return an iterable yielding all matching elements in document order. NrrrrrOrP)rRrSrrrrs r)rElementTree.iterfindsQ 8s?:D MM-/34!   zz""444r(Tshort_empty_elementsc URc [S5eU(dSnOU[;a[SU-5eU(d US:XaSnOSn[ X5upxUS:Xa?U(d+Uc5UR 5S:wa!UR 5S ;a U"S U<S 35 US :Xa[ XpR5 O3[URU5up[Un U "XpRXUS 9 SSS5 g!,(df  g=f)azWrite element tree to a file as XML. Arguments: *file_or_filename* -- file name or a file object opened for writing *encoding* -- the output encoding (default: US-ASCII) *xml_declaration* -- bool indicating if an XML declaration should be added to the output. If None, an XML declaration is added if encoding IS NOT either of: US-ASCII, UTF-8, or Unicode *default_namespace* -- sets the default XML namespace (for "xmlns") *method* -- either "xml" (default), "html, "text", or "c14n" *short_empty_elements* -- controls the formatting of elements that contain no content. If True (default) they are emitted as a single self-closed tag, otherwise they are emitted as a pair of start/end tags NzElementTree not initializedxmlzunknown method %rc14nutf-8us-asciiunicode)rrz rEr)rr3 _serialize ValueError _get_writerlower_serialize_text _namespaces) r7file_or_filenameencodingxml_declarationdefault_namespacemethodrwritedeclared_encodingqnamesr serializes r)rElementTree.writes: :: 9: :F : %069: :"% ) 48RO$,^^%2&,,.6KK%()zz2%0=N%O"&v. %V/CE5 4 4s BC88 Dc"URUSS9$)Nr)r)r)r7rs r) write_c14nElementTree.write_c14nszz$vz..r(rrrD)NNNN)r"r#r$r%r&r9rrr rr~rrrrrr'r!r(r)rrsZ   D $1,>,4,5." $ 5E $( 5En/r(rc## URnUR5S:XaU[USS5=(d S4v g[R"5n[ U[ R5(aUnO[ U[ R5(a2[ R"U5nURUR5 OF[ R"5nSUl X$lURUl URUl[ R "UUSSS9nURUR5 URU4v SSS5 g![a NWf=f!,(df  g=f![aP UR5S:XaSn[#USUSS 9nURU4v SSS5 g!,(df  g=ff=f7f) Nrr rcgNTr!r!r(r)_get_writer.. sDr(xmlcharrefreplace )r errorsnewlinew)r r)rrgetattr contextlib ExitStackr1ioBufferedIOBase RawIOBaseBufferedWritercallbackdetachwritableseekabletellAttributeError TextIOWrapperr)r r rstackrs r)rrs-+ && >> y (!1:tDOO O%%'5.0A0ABB+D 0",,??,,-=>DNN4;;/,,.D$0DM!&J)9(A(A $4$9$9 ''19/B046 t{{+jj(**9('&*'(' ' >> y (H "C(,.15**h& &.... 'sG E:AGBE),"EAE) G E&#E)%E&&E)) E73G:,G&G7G?G G GGGGc^^^SS0m0mT(aSTT'UUU4SjnUR5GHXnURn[U[5(a#URT;aU"UR5 OD[U[ 5(aUT;aU"U5 O UbU[ LaU[La [U5 UR5HoupE[U[5(a URnUT;aU"U5 [U[5(dMKURT;dM]U"UR5 Mq URn[U[5(dGM3URT;dGMFU"UR5 GM[ TT4$)Ncj>USSS:XavUSSRSS5upTRU5nUc1[RU5nUcS[T5-nUS:waUTU'U(a U<SU<3TU'gUTU'gT(a [ S5eUTU'g![ a [ U5 gf=f)Nrrrzns%dr:z.add_qname&s .RayC 9++C3#,>+//4F~!'#j/!9*0 3/5s$;F5M$'F5M$$3!&u  . &u - .sA8B<BBB21B2) rr+r1rrErrr r6r) rGr r:r+rrrErrs ` @@r)r r s7D\FJ(* $%.8 hh c5 ! !xxv%#((# S ! !& # _G!32 &s +**,JC#u%%hh& #%''EJJf,D%**% 'yy dE " "tyy'> dii '( : r(c URnURnU[La U"SU-5 GOU[La U"SU-5 GOX&nUc/U(aU"[ U55 UHn[ XUSUS9 M GOYU"SU-5 [ UR55n U (dU(aU(aH[UR5SS9H+upU (aSU -n U"SU <S [U 5<S 35 M- U Hhup[U [5(a U Rn [U [5(aX*Rn O [U 5n U"S X+<S U <S 35 Mj U(d[U5(dU(dDU"S 5 U(aU"[ U55 UHn[ XUSUS9 M U"S U-S -5 OU"S5 UR(aU"[ UR55 gg)N rrc US$Nrr!xs r)r _serialize_xml..nQqTr(rr3 xmlns=""rr)r+rErr _escape_cdata_serialize_xmllistrsorted_escape_attribr1rrKrF) rrGrrrkwargsr+rErxrvks r)rKrKXs ((C 99D g~ kD ! % % hok ;mD)*u4HJ #) &E  &z'7'7'9+9!; #aA*1- !;"DA!!U++FF!!U++"66N*1-&)Q78"s4yy(<c --.A"5VT8LNdSj3&'e  yy mDII&'r(>brhrcolimgwbrareabaselinkmetaembedframeinputparamtrackrisindexbasefontc <URnURnU[LaU"S[U5-5 GOU[LaU"S[U5-5 GOX%nUc0U(aU"[U55 UHn[ XUS5 M GObU"SU-5 [ UR55nU(dU(aU(aH[UR5SS9H+upU (aSU -n U"SU <S[U 5<S 35 M- UHhup[U [5(a U Rn [U [5(aX)Rn O [U 5n U"S X*<SU <S 35 Mj U"S 5 UR5n U(a&U S :XdU S :Xa U"U5 OU"[U55 UHn[ XUS5 M U [;aU"SU-S -5 UR(aU"[UR55 gg)Nr=r>rc US$r@r!rAs r)r!_serialize_html..rDr(rEr3rFrGrHrrscriptstylerI)r+rErrJr_serialize_htmlrLrrMrNr1r_escape_attrib_htmlr HTML_EMPTYrF) rrGrrrOr+rErxrrPrQltags r)rgrgs ((C 99D g~ kM$//0 % % ht,,-k ;mD)*&$7 #) &E  &z'7'7'9+9!; #aA*1- !;"DA!!U++FF!!U++"66N/2&)Q78" #J99;D8#tw$K--.&$7:%dSj3&' yy mDII&'r(cUR5H nU"U5 M UR(aU"UR5 ggrD)rrF)rrGparts r)rrs1  d   yy diir()rhtmlrEc[R"SU5(a [S5e[[R 55Hup#X!:XdX0:XdM[U M U[U'g)a\Register a namespace prefix. The registry is global, and any existing mapping for either the given prefix or the namespace URI will be removed. *prefix* is the namespace prefix, *uri* is a namespace uri. Tags and attributes in this namespace will be serialized with prefix if possible. ValueError is raised if prefix is reserved or is invalid. zns\d+$z'Prefix format reserved for internal useN)rematchrrLr5r)r9r8rQrPs r)rrsX xx 6""BCC^))+, 8q{q!-!N3r(rrmrdfwsdlxsxsidc)$http://www.w3.org/XML/1998/namespacezhttp://www.w3.org/1999/xhtmlz+http://www.w3.org/1999/02/22-rdf-syntax-ns#z http://schemas.xmlsoap.org/wsdl/z http://www.w3.org/2001/XMLSchemaz)http://www.w3.org/2001/XMLSchema-instancez http://purl.org/dc/elements/1.1/cP[SU<S[U5R<S35e)Nzcannot serialize z (type ))r3rwr"rs r)r6r6s! +/d1D1DE  r(cSU;aURSS5nSU;aURSS5nSU;aURSS5nU$![[4a [U5 gf=f)N&&r<r>replacer3r-r6rs r)rJrJso ) $;<<W-D $;<<V,D $;<<V,D ~ &)"4()A A A*)A*cSU;aURSS5nSU;aURSS5nSU;aURSS5nSU;aURSS5nS U;aURS S 5nS U;aURS S 5nS U;aURS S5nU$![[4a [U5 gf=f)Nrzr{rr|rr}rH" z rz  z r~rs r)rNrNs) $;<<W-D $;<<V,D $;<<V,D 4<<<h/D 4<<<g.D 4<<<g.D 4<<<g.D ~ &)"4()sB)B,,C  C cSU;aURSS5nSU;aURSS5nSU;aURSS5nU$![[4a [U5 gf=f)Nrzr{rr}rHrr~rs r)rhrh"sm ) $;<<W-D $;<<V,D 4<<<h/D ~ &)"4()rT)r r rc US:Xa[R"5O[R"5n[U5R XaUUUUS9 UR 5$)aGenerate string representation of XML element. All subelements are included. If encoding is "unicode", a string is returned. Otherwise a bytestring is returned. *element* is an Element instance, *encoding* is an optional output encoding defaulting to US-ASCII, *method* is an optional output which can be one of "xml" (default), "html", "text" or "c14n", *default_namespace* sets the default XML namespace (for "xmlns"). Returns an (optionally) encoded string containing the XML data. rr r rr)r$StringIOBytesIOrrgetvalue)r-r rr r rstreams r)rr1sT ')3R[[]Fv/>1B&,4H J ?? r(c6\rSrSrSrSrSrSrSrSr Sr g ) _ListDataStreamiIz7An auxiliary stream accumulating into a list reference.cXlgrDlst)r7rs r)r9_ListDataStream.__init__Ksr(cgrr!r=s r)r*_ListDataStream.writableNr(cgrr!r=s r)r+_ListDataStream.seekableQrr(c:URRU5 grD)rrh)r7bs r)r_ListDataStream.writeTs r(c,[UR5$rD)rKrr=s r)r,_ListDataStream.tellWs488}r(rN) r"r#r$r%r&r9r*r+rr,r'r!r(r)rrIsAr(rc X/n[U5n[U5RXqUUUUS9 U$)Nr)rrr)r-r rr r rrrs r)rrZsA C S !Fv/>1B&,4H J Jr(c[U[5(d [U5nUR[RSS9 UR 5R nU(a USS:wa [RRS5 gg)aWrite element tree or element structure to sys.stdout. This function should be used for debugging only. *elem* is either an ElementTree, or a single Element. The exact output format is implementation dependent. In this version, it's written as an ordinary XML file. r)r rN)r1rrsysstdoutrrF)rGrFs r)rrgse dK ( (4 JJszzIJ. <<>  D 48t# $r(c^^^[U[5(aUR5nUS:a[SU35e[ U5(dgSUT--/mUUU4SjmT"US5 g)aIndent an XML document by inserting newlines and indentation space after elements. *tree* is the ElementTree or Element to modify. The (root) element itself will not be changed, but the tail text of all elements in its subtree will be adapted. *space* is the whitespace to insert for each indentation level, two space characters by default. *level* is the initial indentation level. Setting this to a higher value than 0 can be used for indenting subtrees that are more deeply nested inside of a document. rz,Initial indentation level must be >= 0, got Nrc>US-nTUnUR(aURR5(dX0lUHSn[ U5(aT"XB5 UR (a!UR R5(aMMX4lMU WR R5(d TUUlgg![a TUT-nTRU5 Nf=fr@) IndexErrorrhrEstriprKrF)rGlevel child_levelchild_indentationchild_indent_children indentationsspaces r)r indent.._indent_childrensai  3 ,[ 9  yy  1 1)IE5zz 4::UZZ%5%5%7%7. zz!!%e,EJ" 3 ,U 3e ;     1 2 3sC#C-,C-)r1rrrrK)treerrrrs ` @@r)rrzsg$ $$||~ qyGwOPP t9955=()L-,T1r(c<[5nURX5 U$)zParse XML document into element tree. *source* is a filename or file object containing XML data, *parser* is an optional parser instance defaulting to XMLParser. Return an ElementTree instance. )rr )rrrs r)r r s =DJJv Kr(c^^^^^ [XS9m[TS5(d[TS5mSmOSmUUU 4SjnU"T5m"UUU4SjS[RR 5nU"5nS Ul[R"U5m U$) a&Incrementally parse XML document into ElementTree. This class also reports what's going on to the user based on the *events* it is initialized with. The supported events are the strings "start", "end", "start-ns" and "end-ns" (the "ns" events are used to get detailed namespace information). If *events* is omitted, only "end" events are reported. *source* is a filename or file object containing XML data, *events* is a list of events to report back, *parser* is an optional parser instance. Returns an iterator providing (event, elem) pairs. )events_parserrrTFc3|># TR5ShvN URS5nU(dOTRU5 MDTR5nTR5ShvN T"5nUbX#lT(aUR 5 ggNN/!T(aUR 5 ff=f7f)Ni@) read_eventsrr_close_and_return_rootrootr)rrritr pullparserwrs r)iteratoriterparse..iterators %11333{{9-% 446D!--/ / /B~ 4 0  s?B<BBAB-B.BB<BBB99B<cN>\rSrSrYRrUUU4SjrUU4SjrSrg)$iterparse..IterParseIteratoricT>T(aTR5 TR5 grDr)r7rgenrs r)r*iterparse..IterParseIterator.closes  IIKr(c6>T(aTR5 ggrDr)r7rrs r)__del__,iterparse..IterParseIterator.__del__s r(r!N)r"r#r$r%__next__rrr')rrrsr)IterParseIteratorrs<<    r(rN) rr,r collectionsabcIteratorrweakrefref) rrrrrrrrrrs ` @@@@r)r r s"f=J 66 " "fd#  $ 6 C  KOO44   BBG RB Ir(cD\rSrSrS SS.SjjrSrSrSrSrS r S r g) riN)rc[R"5UlU=(d [[ 5S9UlUcSnUR R URU5 g)Nr)end)rdeque _events_queuerrr _setevents)r7rrs r)r9XMLPullParser.__init__sL )..0A);="A >F  2 2F;r(cURc [S5eU(aURRU5 gg![a%nURR U5 SnAgSnAff=f)Feed encoded data to parser.Nz!feed() called after end of stream)rrr SyntaxErrorrrh)r7rexcs r)rXMLPullParser.feed s` << @A A  / !!$'  /""))#.. /s> A-A((A-cHURR5nSUlU$rD)rr)r7rs r)r$XMLPullParser._close_and_return_roots ||!!#  r(c$UR5 g)zFinish feeding data to parser. Unlike XMLParser, does not return the root element. Use read_events() to consume elements from XMLPullParser. N)rr=s r)rXMLPullParser.closes ##%r(c## URnU(a5UR5n[U[5(aUeUv U(aM4gg7f)zReturn an iterator over currently available (event, elem) pairs. Events are consumed from the internal event queue as they are retrieved from the iterator. N)rpopleftr1 Exception)r7revents r)rXMLPullParser.read_events#s? ##NN$E%++  fs AA  A chURc [S5eURR5 g)Nz"flush() called after end of stream)rrflushr=s r)rXMLPullParser.flush1s( << AB B r()rrrD) r"r#r$r%r9rrrrrr'r!r(r)rrs' r(cU(d[[5S9nURU5 UR5n0nUR 5H!nUR S5nU(dMXCU'M# X#4$)aParse XML document from string constant for its IDs. *text* is a string containing XML data, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an (Element, dict) tuple, in which the dict maps element id:s to elements. rr<)rrrrrr)rErridsrGr<s r)rrHsb +-0 KK <<>D C  XXd^ 2G 9r(cU(d[[5S9nUHnURU5 M UR5$)zParse XML document from sequence of string fragments. *sequence* is a list of other sequence, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an Element instance. rr)sequencerrEs r)rr`s5 +-0 D <<>r(cd\rSrSrSrSSSSSS.SjjrSrSrS rS r S r S r SS jr Sr Srg)riraGeneric element structure builder. This builder converts a sequence of start, data, and end method calls to a well-formed element structure. You can use this class to build an element structure using a custom XML parser, or a parser for some other XML-like format. *element_factory* is an optional element factory which is called to create new Element instances, as necessary. *comment_factory* is a factory to create comments to be used instead of the standard factory. If *insert_comments* is false (the default), comments will not be inserted into the tree. *pi_factory* is a factory to create processing instructions to be used instead of the standard factory. If *insert_pis* is false (the default), processing instructions will not be inserted into the tree. NF)comment_factory pi_factoryinsert_comments insert_pisc/Ul/UlSUlSUlSUlUc[ nX lX@lUc[nX0l XPl Uc[nXl grD) _data_elem_lastr_tailr_comment_factoryrr _pi_factoryrr_factory)r7element_factoryrrrrs r)r9TreeBuilder.__init__sd      "%O /.  .J%$  "%O' r(c[UR5S:XdS5eURcS5eUR$)z;Flush builder buffers and return toplevel document Element.rzmissing end tagszmissing toplevel element)rKrrr=s r)rTreeBuilder.closes>4::!#7%77#zz%A'AA%zzr(cbUR(aURbSRUR5nUR(a/URRbS5eXRlO.URR bS5eXRl/Ulgg)Nr1zinternal error (tail)zinternal error (text))rrjoinrrFrEr7rEs r)_flushTreeBuilder._flushs~ ::zz%wwtzz*::::??2K4KK2&*JJO::??2K4KK2&*JJODJ r(c:URRU5 g)zAdd text to current element.N)rrhr7rs r)rTreeBuilder.datas $r(c UR5 URX5=UlnUR(aURSR U5 OUR cX0lURR U5 SUlU$)znOpen new element and return it. *tag* is the element name, *attrs* is a dict containing element attributes. rr)rrrrrhrr)r7r+attrsrGs r)startTreeBuilder.startsl  MM#55 T :: JJrN ! !$ ' ZZ J $  r(cUR5 URR5UlURRU:Xd$SURR<SU<S35eSUlUR$)z?Close and return current Element. *tag* is the element name. zend tag mismatch (expected z, got rxr)rrpoprr+rrs r)rTreeBuilder.endsa ZZ^^% zz~~$ (::>>3( ($ zzr(cPURURURU5$)zPCreate a comment using the comment_factory. *text* is the text of the comment. )_handle_singlerrrs r)commentTreeBuilder.comments* ""  ! !4#7#7? ?r(cPURURURX5$)zCreate a processing instruction using the pi_factory. *target* is the target name of the processing instruction. *text* is the data of the processing instruction, or ''. )r rr)r7rrEs r)piTreeBuilder.pis( ""   doov= =r(cU"U6nU(aLUR5 X@lUR(aURSRU5 SUlU$)Nrr)rrrrhr)r7factoryrqargsrGs r)r TreeBuilder._handle_singlesE~  KKMJzz 2%%d+DJ r() rrrrrrrrrrrD)r"r#r$r%r&r9rrrrrr rr r'r!r(r)rrrsC&(!%$!&5((  " ?=r(rcj\rSrSrSrSSS.SjrSrSrSrS r S r S r S r S r SrSrSrSrg)riaMElement structure builder for XML source data based on the expat parser. *target* is an optional target object which defaults to an instance of the standard TreeBuilder class, *encoding* is an optional encoding string which if given, overrides the encoding specified in the XML file: http://www.iana.org/assignments/character-sets N)rr cSSKJn UR US5nUc [ 5nU=UlUlU=UlUl URUl 0Ul URUl[US5(aUR Ul[US5(aUR$Ul[US5(aUR(Ul[US5(aUR,Ul[US 5(aUR0Ul[US 5(aUR4Ul[US 5(aUR8UlS UlS UlSUl 0Ul!S URD-Ul#g![a" SSKnGN![a [S5ef=ff=f![Ha gf=f)Nrexpatz7No module named expat; use SimpleXMLTreeBuilder insteadrrrstart_nsend_nsrr rrzExpat %d.%d.%d)% xml.parsersr ImportErrorpyexpat ParserCreaterrrr_targeterror_error_names_defaultDefaultHandlerExpandr,_startStartElementHandler_endEndElementHandler _start_nsStartNamespaceDeclHandler_end_nsEndNamespaceDeclHandlerrCharacterDataHandlerr CommentHandlerrProcessingInstructionHandler buffer_textordered_attributes_doctypeentity version_infoversionr-)r7rr rrs r)r9XMLParser.__init__s  )##Hc2 > ]F%++ dl%++ dlkk  &*mm# 67 # #)-F & 65 ! !'+yyF $ 6: & &/3~~F , 68 $ $-1\\F * 66 " "*0++F ' 69 % %$*NNF ! 64 28))F /$%!   +e.@.@@DLM  ' !M  N   s/F 7F; F8FF44F8; GGcBURnURnUGHnUS:Xa SUlXTUR4SjnXclM*US:XaXTUR 4SjnXclMIUS:Xa;[URS5(aXTUR4SjnOXT4S jnXcl MUS :Xa;[URS 5(aXTUR4S jnOXT4S jnXcl MUS:XaXTU4SjnXcl MUS:XaXTU4SjnXclM[SU-5e g)Nrrc"U"X$"X545 grDr!)r+ attrib_inrrhrs r)handler%XMLParser._setevents..handler/sE5#89:r(rc"U"X"U545 grDr!)r+rrhrs r)r:r;4sE3s8,-r(zstart-nsrc"U"X$"X545 grDr!)r9r8rrhrs r)r:r;;sx'<=>r(c>U"X =(d SU=(d S445 gNr1r!)r9r8rrhs r)r:r;?s "ciR'@ABr(zend-nsrc"U"X"U545 grDr!)r9rrhrs r)r:r;Esvf~67r(cU"US45 grDr!)r9rrhs r)r:r;Ist}-r(r cHU"XRRU545 grD)rr )rErrhr7s r)r:r;MsE;;#6#6t#<=>r(rcHU"X$RRX545 grD)rr) pi_targetrrrhr7s r)r:r;QsE;;>>)#BCDr(zunknown event %r)rrhr1r%r&r'r(r,rr)r*r+r,r.r/r)r7 events_queueevents_to_reportrrh event_namer:s r)rXMLParser._setevents#s$$*JW$,-)2<"&++;.5*u$'1 $ .,3(z)4;; 333=)-?4>C3:0x'4;;11.8'+||8/9.18.y((2?(/%t#3=!%E7>3 !3j!@AAU+r(cx[U5nURUlURUR4UlUerD)r codelinenooffsetposition)r7rerrs r) _raiseerrorXMLParser._raiseerrorXs0::||U\\1  r(c~URUnU$![a UnSU;aSU-nX RU'U$f=f)Nrr)r"KeyError)r7rnames r)_fixnameXMLParser._fixname^sS $;;s#D   $Dd{Tz#KK   $s %<<c^URRU=(d SU=(d S5$r?)rrr7r9r8s r)r)XMLParser._start_nsis!{{##FLb#)<A??B BczURR5nURRS5 URRSS5 URRU5 g!URanUR U5 SnANBSnAff=f!URRU5 f=f)NFr()rGetReparseDeferralEnabledSetReparseDeferralEnabledrtr!rO)r7 was_enabledrPs r)rXMLParser.flushskk;;=  ? KK 1 1% 8 KK  c5 ) KK 1 1+ >{{   Q    KK 1 1+ >s)7A//B?BBBBB:) r2r!r"rrr3rrr5)r"r#r$r%r&r9rrOrTr)r+r%r'r#rrrr'r!r(r)rrsN"&+Z3Bj =0 .34%l *"?r(r)out from_filec UcUc [S5eSnUc[R"5=pA[[ UR 40UD6S9nUb"UR U5 UR5 O Ub [X%S9 UbUR5$S$)aConvert XML to its C14N 2.0 serialised form. If *out* is provided, it must be a file or file-like object that receives the serialised canonical XML output (text, not bytes) through its ``.write()`` method. To write to a file, open it in text mode with encoding "utf-8". If *out* is not provided, this function returns the output as text string. Either *xml_data* (an XML string) or *from_file* (a file path or file-like object) must be provided as input. The configuration options are the same as for the ``C14NWriterTarget``. Nz:Either 'xml_data' or 'from_file' must be provided as inputr)r) rr$rrrrrrr r)xml_datar~roptionssiors r)rrsI-UVV C {KKM! .syyDGD EF H    i' _3<<>6$6r(z ^\w+:\w+$c\rSrSrSrSSSSSSSS.Sjr\4SjrSrSS jr S r S R4S jr S r SrSSjrSrSrSrSrg)ria Canonicalization writer target for the XMLParser. Serialises parse events to XML C14N 2.0. The *write* function is used for writing out the resulting data stream as text (not bytes). To write to a file, open it in text mode with encoding "utf-8" and pass its ``.write`` method. Configuration options: - *with_comments*: set to true to include comments - *strip_text*: set to true to strip whitespace before and after text content - *rewrite_prefixes*: set to true to replace namespace prefixes by "n{number}" - *qname_aware_tags*: a set of qname aware tag names in which prefixes should be replaced in text content - *qname_aware_attrs*: a set of qname aware attribute names in which prefixes should be replaced in text content - *exclude_attrs*: a set of attribute names that should not be serialised - *exclude_tags*: a set of tag names that should not be serialised FN) with_comments strip_textrewrite_prefixesqname_aware_tagsqname_aware_attrs exclude_attrs exclude_tagsc\Xl/UlX lX0lU(a [ U5OSUlU(a [ U5OSUlX@lU(a[ U5UlOSUlU(a[ U5RUl OSUl S//Ul /Ul U(d6URR[[R!555 URR/5 0UlS/UlSUlSUlSUlSUlg)N)rvrFr)_writer_with_comments _strip_textr_exclude_attrs _exclude_tags_rewrite_prefixes_qname_aware_tags intersection_find_qname_aware_attrs_declared_ns_stack _ns_stackrhrLr5r _prefix_map_preserve_space_pending_start _root_seen _root_done_ignored_depth) r7rrrrrrrrs r)r9C14NWriterTarget.__init__s  +%4Ac-0t2>S.D!1 %()9%:D "%)D " +./@+A+N+ND (+/D ( <$ #  NN ! !$~';';'="> ? b! %w"r(c#T# U"U5HnU(dM UShvN M gN 7frDr!)r7ns_stack _reversedrs r)_iter_namespaces!C14NWriterTarget._iter_namespaces5s%#H-Jz%%%.%s((& (cURSS5up#URUR5HupEXR:XdM SUSU3s $ [SUSUS35e)Nr3rrrzPrefix z of QName "" is not declared in scope)splitrrr)r7 prefixed_namer9rSr8ps r)_resolve_prefix_name%C14NWriterTarget._resolve_prefix_name:sf$**32 ++DNN;FC{C54&))<76(+m_D^_``r(cUc%USSS:XaUSSRSS5OSU4up#OUn[5nURUR5H4upVXR:XaXd;aU(aUSU3OUX24s $UR U5 M6 UR (amX R ;aUR UnO&S[UR 53=o`R U'URSRX&45 USU3X24$U(d SU;aX3U4$URUR5H=upVXR:XdM URSRX&45 U(aUSU3OUX24s $ U(dX3U4$[SUS 35e) Nrrrr1r3rorz Namespace "r) r4rrraddrrrKrhrr)r7r7r8r+ prefixes_seenur9s r)_qnameC14NWriterTarget._qnameAs ;38!93CuQRy''Q/"eHCC ..t/F/FGIAxF7,2&3%(SEE   f %H  ! !&&&))#.34S9I9I5J4K1LL))#.  # #B ' . .} =XQse$c. .r.S= ..t~~>IAx''+22C=A,2&3%(SEE? S= ;se+EFGGr(c^UR(dURRU5 ggrD)rrrhrs r)rC14NWriterTarget.datafs""" JJ  d ##r(r1cU"UR5nURSS2 UR(a$URS(dUR5nURbFURSso0lU(a[ U5(aUOSnUR "/UQUP76 UbgU(a-UR(aUR[U55 gggNr) rrrrr_looks_like_prefix_namer%rr_escape_cdata_c14n)r7 _join_textrr qname_texts r)rC14NWriterTarget._flushjs$**% JJqM   D$8$8$<::D   C/r(cURb<U(a5UR5VVs0sHupVXPR;dMXV_M nnnU1Ukn0nUb&URU5=oU'URU 5 URbhU(aaUR U5n U (aFU H?n X+n [ U 5(dMURU 5=oU 'URU 5 MA OSn OSn UR n [USS9Vs0sH oU "U5_M nnU(a6UVVs/sHunnU(aSU-OSU4PM nnnUR5 O/nU(a][UR55H@upVU bXZ;aXh;a XUSnXunn nURU(aUOU U45 MB URS5nURRU(aUS:HOURS5 URnU"S XS-5 U(a<U"S RUVVs/sHupVS US [U5S 3PM snn55 U"S5 UbU"[XUS55 SUlUR"R/5 gs snnfs snfs snnfs snnf)Nc&URSS5$)Nrr)r)ros r)r)C14NWriterTarget._start..s!''#q/r(rEzxmlns:xmlnsrz+{http://www.w3.org/XML/1998/namespace}spacepreserverrr1rrGrHrT)rrrrrrrrMsortrhrrrr_escape_attrib_c14nrrr)r7r+rrrrQrPrresolved_namesr7qattrs attr_namer parse_qnamero parsed_qnamesr8r9r] attr_qnamespace_behaviourrs r)r%C14NWriterTarget._starts    *u&+kkmTmdaq@S@S7STQTmET  !151J1J:1V VE:. JJu   ' ' 311%8F!'I!,E.u558<8Q8QRW8XXu 5 5) "( Fkk 4: 153453qKN*53 4 $2#1KC'-F"'3?#1  NN I u{{}-%!+!:M%Q&78;A-:-=* Is  *A!FG . ))$QR ##-)rrrrrrrrrs r)r C14NWriterTarget.commentsw""      ?? KK  __ KKM d-d34C89 KK r(ctUR(agUR(aURS5 O2UR(a!UR(aUR 5 URU(aSUS[ U5S3OSUS35 UR(dURS5 gg)Nrz)rrrrrrr)r7rrs r)rC14NWriterTarget.pis     ?? KK  __ KKM :>b,T232 6bPRO U KK r()rrrrrrrrrrrrrrrrrrD)r"r#r$r%r&r9reversedrrrrrrrrr%rr rr'r!r(r)rrsj, %"&$#$# J4<& a#HJ$!# 210"C"J   r(rc SU;aURSS5nSU;aURSS5nSU;aURSS5nSU;aURSS5nU$![[4a [U5 gf=f) Nrzr{rr|rr}r r~rs r)rrs) $;<<W-D $;<<V,D $;<<V,D 4<<<g.D ~ &)"4()sA!A$$BBcjSU;aURSS5nSU;aURSS5nSU;aURSS5nSU;aURSS5nS U;aURS S 5nS U;aURS S 5nU$![[4a [U5 gf=f) Nrzr{rr|rHrrz rz rrr~rs r)rrs) $;<<W-D $;<<V,D $;<<X.D 4<<<g.D 4<<<g.D 4<<<g.D ~ &)"4()sBBB21B2)r)_set_factoriesrDr)z r)@r&__all__rrrorRr$rcollections.abcr"rr1rrr r rrrrr rrcontextmanagerrr rKrirgrrrr5r6rJrNrhrr%rrrrr r rrrrrrrrcompileUNICODErprrrrrv _elementtreerrr!r(r)rs!P (       # ^^B $&$  +"+"`b/b/N /+/+b;z0(d 0(d    !*-2$*38(.(,16(, %3! ) )8 )!T"&0b''" !%&* &/l <~77t",  $vvth?h?Z7tt7<**\2::>DDD)&). 3K+712  s% E<<FFPK! u::-__pycache__/ElementPath.cpython-313.opt-2.pycnu[ Mi6SSKr\R"S5rSSjrSrSrSrSrSrS r S r S r S r \\\ \ \ \ S .r 0r"SS5rSSjrSSjrSSjrSSjrg)Nz`('[^']*'|\"[^\"]*\"|::|//?|\.\.|\(\)|!=|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@!=\s]+)|\s+c## U(aURS5OSnSn[RU5H~nUupVU(agUSS:wa^SU;a3URSS5upxU(d[eUSX<SU<34v O!U(aU(dUSU<SU<34v OUv SnMuUv US :HnM g![a [ SU-5Sef=f7f) NFr{:}z!prefix %r not found in prefix map@)getxpath_tokenizer_refindallsplitKeyError SyntaxError) pattern namespacesdefault_namespaceparsing_attributetokenttypetagprefixuris # UH!nT"URT5(dMUv M# g7frr+)r resultelem _isinstance_strs rselect_prepare_tag..selectvs&txx..Js, ,z{}*c3v># UH.nURnT"UT5(dMUSS:wdM*Uv M0 g7f)Nrrr+)r r/r0el_tagr1r2s rr3r4|s6vt,,c1AJ 99 9r&r'c3># UH4nURnUT:XdT"UT5(dM%UTT:XdM0Uv M6 g7frr+) r r/r0r6r1r2no_nssuffixrs rr3r4s=S=K$=$=&-SYBYJs $?? ?r(r)c3v># UH.nURnT"UT5(dMUTT:XdM*Uv M0 g7frr+)r r/r0r6r1r2nsns_onlys rr3r4s6vt,,B1FJr7zinternal parser error, got ) isinstancestrslicelen RuntimeError)rr3r1r2r:r>r?r;s` @@@@@@r _prepare_tagrEps"CK f} @ M9  4 M+ RaE QRs6{lD)!"g   M RST  "Xc"g&   M8>??r$c^^USm[T5(a[T5mU4SjnU$TSSS:XaTSSmU4SjnU$)Nrc&>SnT"X"U55$)Nc36# UH nUShvN M gN 7frr*)r/r0s r select_child3prepare_child..select..select_childs"D#OO##  r*r r/rI select_tags rr3prepare_child..selects $g|F';< # UH"nUHnURT:XdMUv M M$ g7frr+r r/r0r"rs rr3rNs*Auu|s- -)r,rEnextrr3rMrs @@r prepare_childrTsS (C!#&  = M r7d?ab'C Mr$c SnU$)Nc36# UH nUShvN M gN 7frr*)r r/r0s rr3prepare_star..selectsDOO rKr*rSrr3s r prepare_starrYs Mr$c SnU$)Nc3$# UShvN gN7frr*)r r/s rr3prepare_self..selectss r*rXs r prepare_selfr]s  Mr$c^^U"5nUSS:XaSmOUS(dUSmO [S5e[T5(a[T5mU4SjnU$TSSS:XaTSSmU4SjnU$![a gf=f) Nr*rzinvalid descendantc&>SnT"X"U55$)Nc3`# UH$nUR5H nX!LdM Uv M M& g7frr)r/r0r"s rrI8prepare_descendant..select..select_childs)"D!YY[="#G)#s. .r*rLs rr3"prepare_descendant..selects $ g|F';< # UH%nURT5H nX2LdM Uv M M' g7frrbrQs rr3rds,3A}(s0 0) StopIterationrr,rErRs @@rprepare_descendantrgs Qx3 1XAh.//!#&  = M r7d?ab'C M5 sA++ A87A8c SnU$)Nc3l# [U5n0nUHnXB;dM X$nXS;dMSX5'Uv M g7fr)r#)r r/r result_mapr0parents rr3prepare_parent..selects?#G,  D!#)+)-J& L s 44 4r*rXs rprepare_parentrms ! Mr$c>^^^^ /n/nU"5nUSS:XaO[US:XaMUS(aUSSSS;a SUSSS4nURUS=(d S5 URUS5 MmS RU5nUS :Xa USmU4S jnU$US :XdUS :Xa"USmUSm UU 4SjnUU 4SjnSU;aU$U$US:Xa,[R"SUS5(d USmU4SjnU$US:Xd1US:Xd+US:XdUS:XaU[R"SUS5(d6USmUSm T(aUU 4SjnUU 4SjnO U 4SjnU 4SjnSU;aU$U$US:Xd US:XdUS:XaqUS:Xa#[ US5S- mTS:a [ S5eO@USS:wa [ S5eUS:Xa$[ US 5S- mTS":a [ S#5eOSmU4S$jnU$[ S%5e![a gf=f![a [ S!5ef=f)&Nrr])rrz'"'r<-rz@-c3P># UHnURT5cMUv M g7frr )r r/r0keys rr3!prepare_predicate..selects#88C=,J& &z@-='z@-!='c3V># UHnURT5T:XdMUv M g7frrs)r r/r0rtvalues rr3rus%88C=E)Js) )c3d># UH%nURT5=ncMUT:wdM!Uv M' g7frrs)r r/r0 attr_valuertrxs rselect_negated)prepare_predicate..select_negateds/"&((3-/J<uATJs 00 0z!=z\-?\d+$c3P># UHnURT5cMUv M g7fr)find)r r/r0rs rr3rus#99S>-Jrvz.='z.!='z-='z-!='c3># UHEnURT5H-nSRUR55T:XdM(Uv MC MG g7fNr)r joinitertextr r/r0r"rrxs rr3rusB"D!\\#.771::<0E9"&J!/# ;AAc3># UHEnURT5H-nSRUR55T:wdM(Uv MC MG g7fr)iterfindrrrs rr{r|"sB"D!]]3/771::<0E9"&J!0#rc3r># UH,nSRUR55T:XdM(Uv M. g7frrrr r/r0rxs rr3ru),"Dwwt}}/58" #'7 7c3r># UH,nSRUR55T:wdM(Uv M. g7frrrs rr{r|-rrz-()z-()-zXPath position >= 1 expectedlastzunsupported functionr8zunsupported expressionr(z)XPath offset from last() must be negativec3># [U5nUH:nX#n[URUR55nUTULaUv M:M< g![[ 4a MRf=f7fr)r#listr r IndexErrorr)r r/rr0rkelemsindexs rr3ruEsl'0J'-F !9:EU|t+" , #H-s(A'4A A'A$ A'#A$$A'zinvalid predicate)rfappendrrematchintr ValueError) rSr signature predicater3r{rrtrrxs @@@@rprepare_predicatersII  FE 8s?  H   8a! -q!B'EqS)q"  "IDl  Fi72l"   "&!2~>>CYq\ B Bl  EY&0 % 9#6HHZ166l"   "  " # #"&!2~>>C9-f1D   ! %)Eqy!"@AA|v%!"899F"@ ! -1E2:%&QRR  ) **M   h"@%&>??@sG6>H6 HHH)rr_.z..z//[c\rSrSrSrSrSrg)_SelectorContexti^NcXlgrr)selfrs r__init___SelectorContext.__init__`s r$r)__name__ __module__ __qualname____firstlineno__rr__static_attributes__r*r$rrr^s Jr$rcUSSS:XaUS-nU4nU(a%U[[UR555- n[UnU/n[U5nUH n U "X5nM U$![a [ [5S:a[R 5 USSS:Xa [S5e[[X55RnU"5nO![a gf=f/nUR[US"XV55 O![a [S5Sef=fU"5nUSS:XaU"5nO![a Of=fMhU[U'GNf=f) Nr</r_drz#cannot use absolute path on elementrz invalid path)tuplesorteditems_cacherrCclearrrr__next__rfropsr) r0pathr cache_keyselectorrSrr/r r3s rrrhsp BCyCczIU6*"2"2"4566 %)$2VFt$G( M9 % v;  LLN 8s?CD DOD56?? FE    <E!H d :;  <!.1t; < 8s? FE   %y-%sr A))A#E CE C#E"C##E*!D  E D##E'D?>E? E  E E  EEc.[[XU5S5$r)rSrr0rrs rr~r~s Z0$ 77r$c,[[XU55$r)rrrs rr r s Z0 11r$c[[XU55nURcgUR$![a Us$f=fr)rSrtextrf)r0rdefaultrs rfindtextrsCHT45 99 yy s"1 1 AAr)NN)rcompiler rr#r,rErTrYr]rgrmrrrrrr~r rr*r$rrsv ZZ   -00&R&  > n+b        'X8 2 r$PK!F؉.__pycache__/cElementTree.cpython-313.opt-1.pycnu[ MiRSSK7 g))*N)xml.etree.ElementTree=/opt/alt/python313/lib64/python3.13/xml/etree/cElementTree.pyrs $rPK!PXX*__pycache__/ElementInclude.cpython-313.pycnu[ Mi(SSKrSSKJr SSKJr Sr\S-r\S-rSr"S S \ 5r "S S \ 5r SS jr SS\4Sjr Srg)N) ElementTree)urljoinz!{http://www.w3.org/2001/XInclude}includefallbackc\rSrSrSrg)FatalIncludeErrorCN__name__ __module__ __qualname____firstlineno____static_attributes__r ?/opt/alt/python313/lib64/python3.13/xml/etree/ElementInclude.pyr r Crr c\rSrSrSrg)LimitedRecursiveIncludeErrorGr Nr r rrrrGrrrc*US:Xa;[US5n[R"U5R5nSSS5 U$U(dSn[USUS9nUR 5nSSS5 U$!,(df  W$=f!,(df  W$=f)NxmlrbzUTF-8r)encoding)openrparsegetrootread)hrefrrfiledatas rdefault_loaderr%Ws ~ $ $$T*224D K H $h /499;D0 K  K0 / Ks%A1B1 B BcUcSnOUS:a[SU-5e[US5(aUR5nUc[n[ XX#[ 55 g)Nrz;expected non-negative depth or None for 'max_depth', got %rr ) ValueErrorhasattrr r%_includeset)elemloaderbase_url max_depths rrrusV QVYbbcctY||~ ~ T86rcdSnU[U5:GaXnUR[:XGaURS5nU(a [ X'5nURSS5nUS:XaXt;a[ SU-5eUS:Xa[ SU-5eURU5 U"Xx5n U c[ SU<SU<35e[R"U 5n [XXsS - U5 URU5 UR(a'U R=(d S UR-U l XU'OUS :XaU"XxURS 55n U c[ SU<SU<35eUR(aXR- n U(a%XS - n U R=(d S U -U l OUR=(d S U -Ul X GM[ S U-5eUR[:Xa[ SUR-5e[XaX#U5 US - nU[U5:aGMgg)Nrr"rrzrecursive include of %sz5maximum xinclude depth reached when including file %sz cannot load z as rtextrz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r))lentagXINCLUDE_INCLUDEgetrr raddcopyr*removetailr2XINCLUDE_FALLBACK) r,r-r.r/ _parent_hrefsier"rnoder2s rr*r*s A c$i- G 55$ $55=Dx.EE'5)E~(+,E,LMM>6ORVVXX!!$'d*<+26>yyt]MJ$$T*66!%bAFF :DIQ&d155+<=<+26>66FFND!9D!%bD 8DI!%bD 8DIG'?%GUU' '#BQUUJ  Q] C Qg c$i--r)N)r8r1r urllib.parserXINCLUDEr5r;DEFAULT_MAX_INCLUSION_DEPTH SyntaxErrorr rr%rr*r rrrDsff  .i'z)     #4 <1 76rPK!PXX0__pycache__/ElementInclude.cpython-313.opt-1.pycnu[ Mi(SSKrSSKJr SSKJr Sr\S-r\S-rSr"S S \ 5r "S S \ 5r SS jr SS\4Sjr Srg)N) ElementTree)urljoinz!{http://www.w3.org/2001/XInclude}includefallbackc\rSrSrSrg)FatalIncludeErrorCN__name__ __module__ __qualname____firstlineno____static_attributes__r ?/opt/alt/python313/lib64/python3.13/xml/etree/ElementInclude.pyr r Crr c\rSrSrSrg)LimitedRecursiveIncludeErrorGr Nr r rrrrGrrrc*US:Xa;[US5n[R"U5R5nSSS5 U$U(dSn[USUS9nUR 5nSSS5 U$!,(df  W$=f!,(df  W$=f)NxmlrbzUTF-8r)encoding)openrparsegetrootread)hrefrrfiledatas rdefault_loaderr%Ws ~ $ $$T*224D K H $h /499;D0 K  K0 / Ks%A1B1 B BcUcSnOUS:a[SU-5e[US5(aUR5nUc[n[ XX#[ 55 g)Nrz;expected non-negative depth or None for 'max_depth', got %rr ) ValueErrorhasattrr r%_includeset)elemloaderbase_url max_depths rrrusV QVYbbcctY||~ ~ T86rcdSnU[U5:GaXnUR[:XGaURS5nU(a [ X'5nURSS5nUS:XaXt;a[ SU-5eUS:Xa[ SU-5eURU5 U"Xx5n U c[ SU<SU<35e[R"U 5n [XXsS - U5 URU5 UR(a'U R=(d S UR-U l XU'OUS :XaU"XxURS 55n U c[ SU<SU<35eUR(aXR- n U(a%XS - n U R=(d S U -U l OUR=(d S U -Ul X GM[ S U-5eUR[:Xa[ SUR-5e[XaX#U5 US - nU[U5:aGMgg)Nrr"rrzrecursive include of %sz5maximum xinclude depth reached when including file %sz cannot load z as rtextrz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r))lentagXINCLUDE_INCLUDEgetrr raddcopyr*removetailr2XINCLUDE_FALLBACK) r,r-r.r/ _parent_hrefsier"rnoder2s rr*r*s A c$i- G 55$ $55=Dx.EE'5)E~(+,E,LMM>6ORVVXX!!$'d*<+26>yyt]MJ$$T*66!%bAFF :DIQ&d155+<=<+26>66FFND!9D!%bD 8DI!%bD 8DIG'?%GUU' '#BQUUJ  Q] C Qg c$i--r)N)r8r1r urllib.parserXINCLUDEr5r;DEFAULT_MAX_INCLUSION_DEPTH SyntaxErrorr rr%rr*r rrrDsff  .i'z)     #4 <1 76rPK!F؉.__pycache__/cElementTree.cpython-313.opt-2.pycnu[ MiRSSK7 g))*N)xml.etree.ElementTree=/opt/alt/python313/lib64/python3.13/xml/etree/cElementTree.pyrs $rPK!*BB-__pycache__/ElementTree.cpython-313.opt-1.pycnu[ Mi#Sr/SQrSrSSKrSSKrSSKrSSKrSSKrSSKrSSK r SSK r SSK J r "SS\ 5rS r"S S 5r04S jrSCS jrSCSjr\r"SS5r"SS5r\ R.S5rSCSjrSr1SkrSrSr\\\S.rSrSSSSSS S!S".r \ \l S#r!S$r"S%r#S&r$SDSSS'S(.S)jjr%"S*S+\RL5r'SDSSS'S(.S,jjr(S-r)SES.jr*SCS/jr+SDS0jr,"S1S25r-SCS3jr.SCS4jr/\.r0SCS5jr1"S6S75r2"S8S95r3SCSSS:.S;jjr4\Rj"S<\Rl5Rnr8"S=S>5r9S?r:S@r;\rr> \>"\\5 g!\?a gf=f)FaLightweight XML support for Python. XML is an inherently hierarchical data format, and the most natural way to represent it is with a tree. This module has two classes for this purpose: 1. ElementTree represents the whole XML document as a tree and 2. Element represents a single node in this tree. Interactions with the whole document (reading and writing to/from files) are usually done on the ElementTree level. Interactions with a single XML element and its sub-elements are done on the Element level. Element is a flexible container object designed to store hierarchical data structures in memory. It can be described as a cross between a list and a dictionary. Each Element has a number of properties associated with it: 'tag' - a string containing the element's name. 'attributes' - a Python dictionary storing the element's attributes. 'text' - a string containing the element's text content. 'tail' - an optional string containing text after the element's end tag. And a number of child elements stored in a Python sequence. To create an element instance, use the Element constructor, or the SubElement factory function. You can also use the ElementTree class to wrap an element structure and convert it to and from XML. )CommentdumpElement ElementTree fromstringfromstringlistindent iselement iterparseparse ParseErrorPIProcessingInstructionQName SubElementtostring tostringlist TreeBuilderVERSIONXMLXMLID XMLParser XMLPullParserregister_namespace canonicalizeC14NWriterTargetz1.3.0N) ElementPathc\rSrSrSrSrg)r kzAn error when parsing an XML document. In addition to its exception value, a ParseError contains two extra attributes: 'code' - the specific exception code 'position' - the line and column of the error N)__name__ __module__ __qualname____firstlineno____doc____static_attributes__r!text...tail Nc [U[5(d#[SURR<35eXl0UEUEUl/Ulg)Nzattrib must be dict, not ) isinstancedict TypeError __class__r"r+attrib _children)selfr+r5extras r)__init__Element.__init__sM&$''  )),- -))5) r(c`SURRUR[U54-$)Nz<%s %r at %#x>)r4r"r+idr7s r)__repr__Element.__repr__s&4>>#:#:DHHbh"OOOr(c$URX5$)zCreate a new element with the same type. *tag* is a string containing the element name. *attrib* is a dictionary containing the element attributes. Do not call this method, use the SubElement factory function instead. )r4)r7r+r5s r) makeelementElement.makeelements~~c**r(cURURUR5nURUlURUlXSS&U$N)rAr+r5texttail)r7elems r)__copy__Element.__copy__s>$++6II II Q r(c,[UR5$rD)lenr6r=s r)__len__Element.__len__s4>>""r(cf[R"S[SS9 [UR5S:g$)NzTesting an element's truth value will always return True in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. stacklevelr)warningswarnDeprecationWarningrKr6r=s r)__bool__Element.__bool__s1  K 1   4>>"a''r(c URU$rDr6r7indexs r) __getitem__Element.__getitem__s~~e$$r(c[U[5(aUHnURU5 M OURU5 X RU'grD)r1slice_assert_is_elementr6)r7rZr-elts r) __setitem__Element.__setitem__sC eU # #'',  # #G , 'ur(cURU grDrXrYs r) __delitem__Element.__delitem__s NN5 !r(c\URU5 URRU5 g)zAdd *subelement* to the end of this element. The new element will appear in document order after the last existing subelement (or directly after the text, if it's the first subelement), but before the end tag for this element. Nr_r6appendr7 subelements r)rhElement.appends$  + j)r(cnUH/nURU5 URRU5 M1 g)z[Append subelements from a sequence. *elements* is a sequence with zero or more elements. Nrg)r7elementsr-s r)extendElement.extends.  G  # #G , NN ! !' * r(c\URU5 URRX5 g)z(Insert *subelement* at position *index*.N)r_r6insert)r7rZrjs r)rqElement.inserts"  + e0r(cp[U[5(d![S[U5R-5egNexpected an Element, not %s)r1 _Element_Pyr3typer")r7es r)r_Element._assert_is_elements1![))9DGrArHrLrUr[rardrhrnrqr_r{r~rrrrrrrrrrr'r!r(r)rr~s( C F1 D D$&P +#(%(" *+1 N * 8 E ; < % -!" ##,r(rc V0UEUEnURX5nURU5 U$)a|Subelement factory which creates an element instance, and appends it to an existing parent. The element tag, attribute names, and attribute values can be either bytes or Unicode strings. *parent* is the parent element, *tag* is the subelements name, *attrib* is an optional directory containing element attributes, *extra* are additional attributes given as keyword arguments. )rArh)parentr+r5r8r-s r)rrs4! % F  -G MM' Nr(c0[[5nXlU$)zComment element factory. This function creates a special element which the standard serializer serializes as an XML comment. *text* is a string containing the comment string. )rrrE)rEr-s r)rrsgGL Nr(cl[[5nXlU(aURS-U-UlU$)aProcessing Instruction element factory. This function creates a special element which the standard serializer serializes as an XML comment. *target* is a string containing the processing instruction, *text* is a string containing the processing instruction contents, if any.  )rrrE)targetrEr-s r)rrs1+,GL ||c)D0 Nr(cR\rSrSrSrSSjrSrSrSrSr S r S r S r S r S rg)riaQualified name wrapper. This class can be used to wrap a QName attribute value in order to get proper namespace handing on output. *text_or_uri* is a string containing the QName value either in the form {uri}local, or if the tag argument is given, the URI part of a QName. *tag* is an optional argument which if given, will make the first argument (text_or_uri) be interpreted as a URI, and this argument (tag) be interpreted as a local name. Nc2U(a SU<SU<3nXlg)N{}rE)r7 text_or_urir+s r)r9QName.__init__s &137K r(cUR$rDrr=s r)__str__ QName.__str__s yyr(cTSURR<SUR<S3$)N)r4r"rEr=s r)r>QName.__repr__s NN33TYY??r(c,[UR5$rD)hashrEr=s r)__hash__QName.__hash__sDIIr(c|[U[5(aURUR:*$URU:*$rDr1rrEr7others r)__le__ QName.__le__1 eU # #99 * *yyE!!r(c|[U[5(aURUR:$URU:$rDrrs r)__lt__ QName.__lt__1 eU # #99uzz) )yy5  r(c|[U[5(aURUR:$URU:$rDrrs r)__ge__ QName.__ge__rr(c|[U[5(aURUR:$URU:$rDrrs r)__gt__ QName.__gt__rr(c|[U[5(aURUR:H$URU:H$rDrrs r)__eq__ QName.__eq__rr(rrD)r"r#r$r%r&r9rr>rrrrrrr'r!r(r)rrs5  @"!"!"r(rc\rSrSrSrSSjrSrSrSSjrSSjr SS jr SS jr SS jr SS jr SS S.SjjrSrSrg)ria An XML element hierarchy. This class also provides support for serialization to and from standard XML. *element* is an optional root element node, *file* is an optional file handle or file name of an XML file whose contents will be used to initialize the tree with. NcUb1[U5(d![S[U5R-5eXlU(aUR U5 ggrt)r r3rwr"_rootr )r7r-files r)r9ElementTree.__init__ sM  y'9'99 M2234 4  JJt  r(cUR$)z!Return root element of this tree.rr=s r)getrootElementTree.getroots zzr(cr[U5(d![S[U5R-5eXlg)zReplace root element of this tree. This will discard the current contents of the tree and replace it with the given element. Use with care! ruN)r r3rwr"r)r7r-s r)_setrootElementTree._setroots6!!9"7m4456 6 r(c(Sn[US5(d[US5nSnUcU[5n[US5(a:URU5UlURU(aUR 5 $$UR S5=n(a+URU5 UR S5=n(aM+UR 5UlURU(aUR 5 $$!U(aUR 5 ff=f)aLoad external XML document into element tree. *source* is a file name or file object, *parser* is an optional parser instance that defaults to XMLParser. ParseError is raised if the parser fails to parse the document. Returns the root element of the given source document. FreadrbT _parse_wholei)r,openrrrcloserfeed)r7sourceparser close_sourcedatas r)r ElementTree.parse%s vv&&&$'FL ~"6>22 "(!4!4V! C77Dc8URRU5$)zCreate and return tree iterator for the root element. The iterator loops over all elements in this tree, in document order. *tag* is a string with the tag name to iterate over (default is to return all elements). )rrr7r+s r)rElementTree.iterGszzs##r(cUSSS:Xa"SU-n[R"SU-[SS9 URR X5$)a4Find first matching element by tag name or path. Same as getroot().find(path), which is Element.find() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found. Nr/.This search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rrOrP)rRrS FutureWarningrr~rs r)r~ElementTree.findSsO 8s?:D MM-/34!   zzt00r(cUSSS:Xa"SU-n[R"SU-[SS9 URR XU5$)a=Find first matching element by tag name or path. Same as getroot().findtext(path), which is Element.findtext() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return the first matching element, or None if no element was found. NrrrrrOrP)rRrSrrrrs r)rElementTree.findtextisS 8s?:D MM-/34!   zz""4*==r(cUSSS:Xa"SU-n[R"SU-[SS9 URR X5$)a9Find all matching subelements by tag name or path. Same as getroot().findall(path), which is Element.findall(). *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return list containing all matching elements in document order. NrrrrrOrP)rRrSrrrrs r)rElementTree.findallsQ 8s?:D MM-/34!   zz!!$33r(cUSSS:Xa"SU-n[R"SU-[SS9 URR X5$)a?Find all matching subelements by tag name or path. Same as getroot().iterfind(path), which is element.iterfind() *path* is a string having either an element tag or an XPath, *namespaces* is an optional mapping from namespace prefix to full name. Return an iterable yielding all matching elements in document order. NrrrrrOrP)rRrSrrrrs r)rElementTree.iterfindsQ 8s?:D MM-/34!   zz""444r(Tshort_empty_elementsc URc [S5eU(dSnOU[;a[SU-5eU(d US:XaSnOSn[ X5upxUS:Xa?U(d+Uc5UR 5S:wa!UR 5S ;a U"S U<S 35 US :Xa[ XpR5 O3[URU5up[Un U "XpRXUS 9 SSS5 g!,(df  g=f)azWrite element tree to a file as XML. Arguments: *file_or_filename* -- file name or a file object opened for writing *encoding* -- the output encoding (default: US-ASCII) *xml_declaration* -- bool indicating if an XML declaration should be added to the output. If None, an XML declaration is added if encoding IS NOT either of: US-ASCII, UTF-8, or Unicode *default_namespace* -- sets the default XML namespace (for "xmlns") *method* -- either "xml" (default), "html, "text", or "c14n" *short_empty_elements* -- controls the formatting of elements that contain no content. If True (default) they are emitted as a single self-closed tag, otherwise they are emitted as a pair of start/end tags NzElementTree not initializedxmlzunknown method %rc14nutf-8us-asciiunicode)rrz rEr)rr3 _serialize ValueError _get_writerlower_serialize_text _namespaces) r7file_or_filenameencodingxml_declarationdefault_namespacemethodrwritedeclared_encodingqnamesr serializes r)rElementTree.writes: :: 9: :F : %069: :"% ) 48RO$,^^%2&,,.6KK%()zz2%0=N%O"&v. %V/CE5 4 4s BC88 Dc"URUSS9$)Nr)r)r)r7rs r) write_c14nElementTree.write_c14nszz$vz..r(rrrD)NNNN)r"r#r$r%r&r9rrr rr~rrrrrr'r!r(r)rrsZ   D $1,>,4,5." $ 5E $( 5En/r(rc## URnUR5S:XaU[USS5=(d S4v g[R"5n[ U[ R5(aUnO[ U[ R5(a2[ R"U5nURUR5 OF[ R"5nSUl X$lURUl URUl[ R "UUSSS9nURUR5 URU4v SSS5 g![a NWf=f!,(df  g=f![aP UR5S:XaSn[#USUSS 9nURU4v SSS5 g!,(df  g=ff=f7f) Nrr rcgNTr!r!r(r)_get_writer.. sDr(xmlcharrefreplace )r errorsnewlinew)r r)rrgetattr contextlib ExitStackr1ioBufferedIOBase RawIOBaseBufferedWritercallbackdetachwritableseekabletellAttributeError TextIOWrapperr)r r rstackrs r)rrs-+ && >> y (!1:tDOO O%%'5.0A0ABB+D 0",,??,,-=>DNN4;;/,,.D$0DM!&J)9(A(A $4$9$9 ''19/B046 t{{+jj(**9('&*'(' ' >> y (H "C(,.15**h& &.... 'sG E:AGBE),"EAE) G E&#E)%E&&E)) E73G:,G&G7G?G G GGGGc^^^SS0m0mT(aSTT'UUU4SjnUR5GHXnURn[U[5(a#URT;aU"UR5 OD[U[ 5(aUT;aU"U5 O UbU[ LaU[La [U5 UR5HoupE[U[5(a URnUT;aU"U5 [U[5(dMKURT;dM]U"UR5 Mq URn[U[5(dGM3URT;dGMFU"UR5 GM[ TT4$)Ncj>USSS:XavUSSRSS5upTRU5nUc1[RU5nUcS[T5-nUS:waUTU'U(a U<SU<3TU'gUTU'gT(a [ S5eUTU'g![ a [ U5 gf=f)Nrrrzns%dr:z.add_qname&s .RayC 9++C3#,>+//4F~!'#j/!9*0 3/5s$;F5M$'F5M$$3!&u  . &u - .sA8B<BBB21B2) rr+r1rrErrr r6r) rGr r:r+rrrErrs ` @@r)r r s7D\FJ(* $%.8 hh c5 ! !xxv%#((# S ! !& # _G!32 &s +**,JC#u%%hh& #%''EJJf,D%**% 'yy dE " "tyy'> dii '( : r(c URnURnU[La U"SU-5 GOU[La U"SU-5 GOX&nUc/U(aU"[ U55 UHn[ XUSUS9 M GOYU"SU-5 [ UR55n U (dU(aU(aH[UR5SS9H+upU (aSU -n U"SU <S [U 5<S 35 M- U Hhup[U [5(a U Rn [U [5(aX*Rn O [U 5n U"S X+<S U <S 35 Mj U(d[U5(dU(dDU"S 5 U(aU"[ U55 UHn[ XUSUS9 M U"S U-S -5 OU"S5 UR(aU"[ UR55 gg)N rrc US$Nrr!xs r)r _serialize_xml..nQqTr(rr3 xmlns=""rr)r+rErr _escape_cdata_serialize_xmllistrsorted_escape_attribr1rrKrF) rrGrrrkwargsr+rErxrvks r)rKrKXs ((C 99D g~ kD ! % % hok ;mD)*u4HJ #) &E  &z'7'7'9+9!; #aA*1- !;"DA!!U++FF!!U++"66N*1-&)Q78"s4yy(<c --.A"5VT8LNdSj3&'e  yy mDII&'r(>brhrcolimgwbrareabaselinkmetaembedframeinputparamtrackrisindexbasefontc <URnURnU[LaU"S[U5-5 GOU[LaU"S[U5-5 GOX%nUc0U(aU"[U55 UHn[ XUS5 M GObU"SU-5 [ UR55nU(dU(aU(aH[UR5SS9H+upU (aSU -n U"SU <S[U 5<S 35 M- UHhup[U [5(a U Rn [U [5(aX)Rn O [U 5n U"S X*<SU <S 35 Mj U"S 5 UR5n U(a&U S :XdU S :Xa U"U5 OU"[U55 UHn[ XUS5 M U [;aU"SU-S -5 UR(aU"[UR55 gg)Nr=r>rc US$r@r!rAs r)r!_serialize_html..rDr(rEr3rFrGrHrrscriptstylerI)r+rErrJr_serialize_htmlrLrrMrNr1r_escape_attrib_htmlr HTML_EMPTYrF) rrGrrrOr+rErxrrPrQltags r)rgrgs ((C 99D g~ kM$//0 % % ht,,-k ;mD)*&$7 #) &E  &z'7'7'9+9!; #aA*1- !;"DA!!U++FF!!U++"66N/2&)Q78" #J99;D8#tw$K--.&$7:%dSj3&' yy mDII&'r(cUR5H nU"U5 M UR(aU"UR5 ggrD)rrF)rrGparts r)rrs1  d   yy diir()rhtmlrEc[R"SU5(a [S5e[[R 55Hup#X!:XdX0:XdM[U M U[U'g)a\Register a namespace prefix. The registry is global, and any existing mapping for either the given prefix or the namespace URI will be removed. *prefix* is the namespace prefix, *uri* is a namespace uri. Tags and attributes in this namespace will be serialized with prefix if possible. ValueError is raised if prefix is reserved or is invalid. zns\d+$z'Prefix format reserved for internal useN)rematchrrLr5r)r9r8rQrPs r)rrsX xx 6""BCC^))+, 8q{q!-!N3r(rrmrdfwsdlxsxsidc)$http://www.w3.org/XML/1998/namespacezhttp://www.w3.org/1999/xhtmlz+http://www.w3.org/1999/02/22-rdf-syntax-ns#z http://schemas.xmlsoap.org/wsdl/z http://www.w3.org/2001/XMLSchemaz)http://www.w3.org/2001/XMLSchema-instancez http://purl.org/dc/elements/1.1/cP[SU<S[U5R<S35e)Nzcannot serialize z (type ))r3rwr"rs r)r6r6s! +/d1D1DE  r(cSU;aURSS5nSU;aURSS5nSU;aURSS5nU$![[4a [U5 gf=f)N&&r<r>replacer3r-r6rs r)rJrJso ) $;<<W-D $;<<V,D $;<<V,D ~ &)"4()A A A*)A*cSU;aURSS5nSU;aURSS5nSU;aURSS5nSU;aURSS5nS U;aURS S 5nS U;aURS S 5nS U;aURS S5nU$![[4a [U5 gf=f)Nrzr{rr|rr}rH" z rz  z r~rs r)rNrNs) $;<<W-D $;<<V,D $;<<V,D 4<<<h/D 4<<<g.D 4<<<g.D 4<<<g.D ~ &)"4()sB)B,,C  C cSU;aURSS5nSU;aURSS5nSU;aURSS5nU$![[4a [U5 gf=f)Nrzr{rr}rHrr~rs r)rhrh"sm ) $;<<W-D $;<<V,D 4<<<h/D ~ &)"4()rT)r r rc US:Xa[R"5O[R"5n[U5R XaUUUUS9 UR 5$)aGenerate string representation of XML element. All subelements are included. If encoding is "unicode", a string is returned. Otherwise a bytestring is returned. *element* is an Element instance, *encoding* is an optional output encoding defaulting to US-ASCII, *method* is an optional output which can be one of "xml" (default), "html", "text" or "c14n", *default_namespace* sets the default XML namespace (for "xmlns"). Returns an (optionally) encoded string containing the XML data. rr r rr)r$StringIOBytesIOrrgetvalue)r-r rr r rstreams r)rr1sT ')3R[[]Fv/>1B&,4H J ?? r(c6\rSrSrSrSrSrSrSrSr Sr g ) _ListDataStreamiIz7An auxiliary stream accumulating into a list reference.cXlgrDlst)r7rs r)r9_ListDataStream.__init__Ksr(cgrr!r=s r)r*_ListDataStream.writableNr(cgrr!r=s r)r+_ListDataStream.seekableQrr(c:URRU5 grD)rrh)r7bs r)r_ListDataStream.writeTs r(c,[UR5$rD)rKrr=s r)r,_ListDataStream.tellWs488}r(rN) r"r#r$r%r&r9r*r+rr,r'r!r(r)rrIsAr(rc X/n[U5n[U5RXqUUUUS9 U$)Nr)rrr)r-r rr r rrrs r)rrZsA C S !Fv/>1B&,4H J Jr(c[U[5(d [U5nUR[RSS9 UR 5R nU(a USS:wa [RRS5 gg)aWrite element tree or element structure to sys.stdout. This function should be used for debugging only. *elem* is either an ElementTree, or a single Element. The exact output format is implementation dependent. In this version, it's written as an ordinary XML file. r)r rN)r1rrsysstdoutrrF)rGrFs r)rrgse dK ( (4 JJszzIJ. <<>  D 48t# $r(c^^^[U[5(aUR5nUS:a[SU35e[ U5(dgSUT--/mUUU4SjmT"US5 g)aIndent an XML document by inserting newlines and indentation space after elements. *tree* is the ElementTree or Element to modify. The (root) element itself will not be changed, but the tail text of all elements in its subtree will be adapted. *space* is the whitespace to insert for each indentation level, two space characters by default. *level* is the initial indentation level. Setting this to a higher value than 0 can be used for indenting subtrees that are more deeply nested inside of a document. rz,Initial indentation level must be >= 0, got Nrc>US-nTUnUR(aURR5(dX0lUHSn[ U5(aT"XB5 UR (a!UR R5(aMMX4lMU WR R5(d TUUlgg![a TUT-nTRU5 Nf=fr@) IndexErrorrhrEstriprKrF)rGlevel child_levelchild_indentationchild_indent_children indentationsspaces r)r indent.._indent_childrensai  3 ,[ 9  yy  1 1)IE5zz 4::UZZ%5%5%7%7. zz!!%e,EJ" 3 ,U 3e ;     1 2 3sC#C-,C-)r1rrrrK)treerrrrs ` @@r)rrzsg$ $$||~ qyGwOPP t9955=()L-,T1r(c<[5nURX5 U$)zParse XML document into element tree. *source* is a filename or file object containing XML data, *parser* is an optional parser instance defaulting to XMLParser. Return an ElementTree instance. )rr )rrrs r)r r s =DJJv Kr(c^^^^^ [XS9m[TS5(d[TS5mSmOSmUUU 4SjnU"T5m"UUU4SjS[RR 5nU"5nS Ul[R"U5m U$) a&Incrementally parse XML document into ElementTree. This class also reports what's going on to the user based on the *events* it is initialized with. The supported events are the strings "start", "end", "start-ns" and "end-ns" (the "ns" events are used to get detailed namespace information). If *events* is omitted, only "end" events are reported. *source* is a filename or file object containing XML data, *events* is a list of events to report back, *parser* is an optional parser instance. Returns an iterator providing (event, elem) pairs. )events_parserrrTFc3|># TR5ShvN URS5nU(dOTRU5 MDTR5nTR5ShvN T"5nUbX#lT(aUR 5 ggNN/!T(aUR 5 ff=f7f)Ni@) read_eventsrr_close_and_return_rootrootr)rrritr pullparserwrs r)iteratoriterparse..iterators %11333{{9-% 446D!--/ / /B~ 4 0  s?B<BBAB-B.BB<BBB99B<cN>\rSrSrYRrUUU4SjrUU4SjrSrg)$iterparse..IterParseIteratoricT>T(aTR5 TR5 grDr)r7rgenrs r)r*iterparse..IterParseIterator.closes  IIKr(c6>T(aTR5 ggrDr)r7rrs r)__del__,iterparse..IterParseIterator.__del__s r(r!N)r"r#r$r%__next__rrr')rrrsr)IterParseIteratorrs<<    r(rN) rr,r collectionsabcIteratorrweakrefref) rrrrrrrrrrs ` @@@@r)r r s"f=J 66 " "fd#  $ 6 C  KOO44   BBG RB Ir(cD\rSrSrS SS.SjjrSrSrSrSrS r S r g) riN)rc[R"5UlU=(d [[ 5S9UlUcSnUR R URU5 g)Nr)end)rdeque _events_queuerrr _setevents)r7rrs r)r9XMLPullParser.__init__sL )..0A);="A >F  2 2F;r(cURc [S5eU(aURRU5 gg![a%nURR U5 SnAgSnAff=f)Feed encoded data to parser.Nz!feed() called after end of stream)rrr SyntaxErrorrrh)r7rexcs r)rXMLPullParser.feed s` << @A A  / !!$'  /""))#.. /s> A-A((A-cHURR5nSUlU$rD)rr)r7rs r)r$XMLPullParser._close_and_return_roots ||!!#  r(c$UR5 g)zFinish feeding data to parser. Unlike XMLParser, does not return the root element. Use read_events() to consume elements from XMLPullParser. N)rr=s r)rXMLPullParser.closes ##%r(c## URnU(a5UR5n[U[5(aUeUv U(aM4gg7f)zReturn an iterator over currently available (event, elem) pairs. Events are consumed from the internal event queue as they are retrieved from the iterator. N)rpopleftr1 Exception)r7revents r)rXMLPullParser.read_events#s? ##NN$E%++  fs AA  A chURc [S5eURR5 g)Nz"flush() called after end of stream)rrflushr=s r)rXMLPullParser.flush1s( << AB B r()rrrD) r"r#r$r%r9rrrrrr'r!r(r)rrs' r(cU(d[[5S9nURU5 UR5n0nUR 5H!nUR S5nU(dMXCU'M# X#4$)aParse XML document from string constant for its IDs. *text* is a string containing XML data, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an (Element, dict) tuple, in which the dict maps element id:s to elements. rr<)rrrrrr)rErridsrGr<s r)rrHsb +-0 KK <<>D C  XXd^ 2G 9r(cU(d[[5S9nUHnURU5 M UR5$)zParse XML document from sequence of string fragments. *sequence* is a list of other sequence, *parser* is an optional parser instance, defaulting to the standard XMLParser. Returns an Element instance. rr)sequencerrEs r)rr`s5 +-0 D <<>r(cd\rSrSrSrSSSSSS.SjjrSrSrS rS r S r S r SS jr Sr Srg)riraGeneric element structure builder. This builder converts a sequence of start, data, and end method calls to a well-formed element structure. You can use this class to build an element structure using a custom XML parser, or a parser for some other XML-like format. *element_factory* is an optional element factory which is called to create new Element instances, as necessary. *comment_factory* is a factory to create comments to be used instead of the standard factory. If *insert_comments* is false (the default), comments will not be inserted into the tree. *pi_factory* is a factory to create processing instructions to be used instead of the standard factory. If *insert_pis* is false (the default), processing instructions will not be inserted into the tree. NF)comment_factory pi_factoryinsert_comments insert_pisc/Ul/UlSUlSUlSUlUc[ nX lX@lUc[nX0l XPl Uc[nXl grD) _data_elem_lastr_tailr_comment_factoryrr _pi_factoryrr_factory)r7element_factoryrrrrs r)r9TreeBuilder.__init__sd      "%O /.  .J%$  "%O' r(cUR$)z;Flush builder buffers and return toplevel document Element.rr=s r)rTreeBuilder.closeszzr(cUR(abURbMSRUR5nUR(aXRlOXRl/UlggNr1)rrjoinrrFrEr7rEs r)_flushTreeBuilder._flushsL ::zz%wwtzz*::&*JJO'+JJODJ r(c:URRU5 g)zAdd text to current element.N)rrhr7rs r)rTreeBuilder.datas $r(c UR5 URX5=UlnUR(aURSR U5 OUR cX0lURR U5 SUlU$)znOpen new element and return it. *tag* is the element name, *attrs* is a dict containing element attributes. rr)rrrrrhrr)r7r+attrsrGs r)startTreeBuilder.startsl  MM#55 T :: JJrN ! !$ ' ZZ J $  r(cUR5 URR5UlSUlUR$)z?Close and return current Element. *tag* is the element name. r)rrpoprrrs r)rTreeBuilder.ends2 ZZ^^%  zzr(cPURURURU5$)zPCreate a comment using the comment_factory. *text* is the text of the comment. )_handle_singlerrrs r)commentTreeBuilder.comments* ""  ! !4#7#7? ?r(cPURURURX5$)zCreate a processing instruction using the pi_factory. *target* is the target name of the processing instruction. *text* is the data of the processing instruction, or ''. )r rr)r7rrEs r)piTreeBuilder.pis( ""   doov= =r(cU"U6nU(aLUR5 X@lUR(aURSRU5 SUlU$)Nrr)rrrrhr)r7factoryrqargsrGs r)r TreeBuilder._handle_singlesE~  KKMJzz 2%%d+DJ r() rrrrrrrrrrrD)r"r#r$r%r&r9rrrrrr rr r'r!r(r)rrrsC&(!%$!&5((  " ?=r(rcj\rSrSrSrSSS.SjrSrSrSrS r S r S r S r S r SrSrSrSrg)riaMElement structure builder for XML source data based on the expat parser. *target* is an optional target object which defaults to an instance of the standard TreeBuilder class, *encoding* is an optional encoding string which if given, overrides the encoding specified in the XML file: http://www.iana.org/assignments/character-sets N)rr cSSKJn UR US5nUc [ 5nU=UlUlU=UlUl URUl 0Ul URUl[US5(aUR Ul[US5(aUR$Ul[US5(aUR(Ul[US5(aUR,Ul[US 5(aUR0Ul[US 5(aUR4Ul[US 5(aUR8UlS UlS UlSUl 0Ul!S URD-Ul#g![a" SSKnGN![a [S5ef=ff=f![Ha gf=f)Nrexpatz7No module named expat; use SimpleXMLTreeBuilder insteadrrrstart_nsend_nsrr rrzExpat %d.%d.%d)% xml.parsersr ImportErrorpyexpat ParserCreaterrrr_targeterror_error_names_defaultDefaultHandlerExpandr,_startStartElementHandler_endEndElementHandler _start_nsStartNamespaceDeclHandler_end_nsEndNamespaceDeclHandlerrCharacterDataHandlerr CommentHandlerrProcessingInstructionHandler buffer_textordered_attributes_doctypeentity version_infoversionr-)r7rr rrs r)r9XMLParser.__init__s  )##Hc2 > ]F%++ dl%++ dlkk  &*mm# 67 # #)-F & 65 ! !'+yyF $ 6: & &/3~~F , 68 $ $-1\\F * 66 " "*0++F ' 69 % %$*NNF ! 64 28))F /$%!   +e.@.@@DLM  ' !M  N   s/F 7F; F8FF44F8; GGcBURnURnUGHnUS:Xa SUlXTUR4SjnXclM*US:XaXTUR 4SjnXclMIUS:Xa;[URS5(aXTUR4SjnOXT4S jnXcl MUS :Xa;[URS 5(aXTUR4S jnOXT4S jnXcl MUS:XaXTU4SjnXcl MUS:XaXTU4SjnXclM[SU-5e g)Nrrc"U"X$"X545 grDr!)r+ attrib_inrrhrs r)handler%XMLParser._setevents..handler/sE5#89:r(rc"U"X"U545 grDr!)r+rrhrs r)r;r<4sE3s8,-r(zstart-nsrc"U"X$"X545 grDr!)r9r8rrhrs r)r;r<;sx'<=>r(c>U"X =(d SU=(d S445 grr!)r9r8rrhs r)r;r<?s "ciR'@ABr(zend-nsrc"U"X"U545 grDr!)r9rrhrs r)r;r<Esvf~67r(cU"US45 grDr!)r9rrhs r)r;r<Ist}-r(r cHU"XRRU545 grD)rr )rErrhr7s r)r;r<MsE;;#6#6t#<=>r(rcHU"X$RRX545 grD)rr) pi_targetrrrhr7s r)r;r<QsE;;>>)#BCDr(zunknown event %r)rrhr2r&r'r(r)r,rr*r+r,r-r/r0r)r7 events_queueevents_to_reportrrh event_namer;s r)rXMLParser._setevents#s$$*JW$,-)2<"&++;.5*u$'1 $ .,3(z)4;; 333=)-?4>C3:0x'4;;11.8'+||8/9.18.y((2?(/%t#3=!%E7>3 !3j!@AAU+r(cx[U5nURUlURUR4UlUerD)r codelinenooffsetposition)r7rerrs r) _raiseerrorXMLParser._raiseerrorXs0::||U\\1  r(c~URUnU$![a UnSU;aSU-nX RU'U$f=f)Nrr)r#KeyError)r7rnames r)_fixnameXMLParser._fixname^sS $;;s#D   $Dd{Tz#KK   $s %<<c^URRU=(d SU=(d S5$r)rrr7r9r8s r)r*XMLParser._start_nsis!{{##FLb#)<A??B BczURR5nURRS5 URRSS5 URRU5 g!URanUR U5 SnANBSnAff=f!URRU5 f=f)NFr()rGetReparseDeferralEnabledSetReparseDeferralEnabledrtr"rO)r7 was_enabledrPs r)rXMLParser.flushskk;;=  ? KK 1 1% 8 KK  c5 ) KK 1 1+ >{{   Q    KK 1 1+ >s)7A//B?BBBBB:) r3r"r#rr r4rrr6)r"r#r$r%r&r9rrOrTr*r,r&r(r$rrrr'r!r(r)rrsN"&+Z3Bj =0 .34%l *"?r(r)out from_filec UcUc [S5eSnUc[R"5=pA[[ UR 40UD6S9nUb"UR U5 UR5 O Ub [X%S9 UbUR5$S$)aConvert XML to its C14N 2.0 serialised form. If *out* is provided, it must be a file or file-like object that receives the serialised canonical XML output (text, not bytes) through its ``.write()`` method. To write to a file, open it in text mode with encoding "utf-8". If *out* is not provided, this function returns the output as text string. Either *xml_data* (an XML string) or *from_file* (a file path or file-like object) must be provided as input. The configuration options are the same as for the ``C14NWriterTarget``. Nz:Either 'xml_data' or 'from_file' must be provided as inputr)r) rr$rrrrrrr r)xml_datar~roptionssiors r)rrsI-UVV C {KKM! .syyDGD EF H    i' _3<<>6$6r(z ^\w+:\w+$c\rSrSrSrSSSSSSSS.Sjr\4SjrSrSS jr S r S R4S jr S r SrSSjrSrSrSrSrg)ria Canonicalization writer target for the XMLParser. Serialises parse events to XML C14N 2.0. The *write* function is used for writing out the resulting data stream as text (not bytes). To write to a file, open it in text mode with encoding "utf-8" and pass its ``.write`` method. Configuration options: - *with_comments*: set to true to include comments - *strip_text*: set to true to strip whitespace before and after text content - *rewrite_prefixes*: set to true to replace namespace prefixes by "n{number}" - *qname_aware_tags*: a set of qname aware tag names in which prefixes should be replaced in text content - *qname_aware_attrs*: a set of qname aware attribute names in which prefixes should be replaced in text content - *exclude_attrs*: a set of attribute names that should not be serialised - *exclude_tags*: a set of tag names that should not be serialised FN) with_comments strip_textrewrite_prefixesqname_aware_tagsqname_aware_attrs exclude_attrs exclude_tagsc\Xl/UlX lX0lU(a [ U5OSUlU(a [ U5OSUlX@lU(a[ U5UlOSUlU(a[ U5RUl OSUl S//Ul /Ul U(d6URR[[R!555 URR/5 0UlS/UlSUlSUlSUlSUlg)N)rvrFr)_writer_with_comments _strip_textr_exclude_attrs _exclude_tags_rewrite_prefixes_qname_aware_tags intersection_find_qname_aware_attrs_declared_ns_stack _ns_stackrhrLr5r _prefix_map_preserve_space_pending_start _root_seen _root_done_ignored_depth) r7rrrrrrrrs r)r9C14NWriterTarget.__init__s  +%4Ac-0t2>S.D!1 %()9%:D "%)D " +./@+A+N+ND (+/D ( <$ #  NN ! !$~';';'="> ? b! %w"r(c#T# U"U5HnU(dM UShvN M gN 7frDr!)r7ns_stack _reversedrs r)_iter_namespaces!C14NWriterTarget._iter_namespaces5s%#H-Jz%%%.%s((& (cURSS5up#URUR5HupEXR:XdM SUSU3s $ [SUSUS35e)Nr3rrrzPrefix z of QName "" is not declared in scope)splitrrr)r7 prefixed_namer9rSr8ps r)_resolve_prefix_name%C14NWriterTarget._resolve_prefix_name:sf$**32 ++DNN;FC{C54&))<76(+m_D^_``r(cUc%USSS:XaUSSRSS5OSU4up#OUn[5nURUR5H4upVXR:XaXd;aU(aUSU3OUX24s $UR U5 M6 UR (amX R ;aUR UnO&S[UR 53=o`R U'URSRX&45 USU3X24$U(d SU;aX3U4$URUR5H=upVXR:XdM URSRX&45 U(aUSU3OUX24s $ U(dX3U4$[SUS 35e) Nrrrr1r3rorz Namespace "r) r4rrraddrrrKrhrr)r7r7r8r+ prefixes_seenur9s r)_qnameC14NWriterTarget._qnameAs ;38!93CuQRy''Q/"eHCC ..t/F/FGIAxF7,2&3%(SEE   f %H  ! !&&&))#.34S9I9I5J4K1LL))#.  # #B ' . .} =XQse$c. .r.S= ..t~~>IAx''+22C=A,2&3%(SEE? S= ;se+EFGGr(c^UR(dURRU5 ggrD)rrrhrs r)rC14NWriterTarget.datafs""" JJ  d ##r(r1cU"UR5nURSS2 UR(a$URS(dUR5nURbFURSso0lU(a[ U5(aUOSnUR "/UQUP76 UbgU(a-UR(aUR[U55 gggNr) rrrrr_looks_like_prefix_namer&rr_escape_cdata_c14n)r7 _join_textrr qname_texts r)rC14NWriterTarget._flushjs$**% JJqM   D$8$8$<::D   C/r(cURb<U(a5UR5VVs0sHupVXPR;dMXV_M nnnU1Ukn0nUb&URU5=oU'URU 5 URbhU(aaUR U5n U (aFU H?n X+n [ U 5(dMURU 5=oU 'URU 5 MA OSn OSn UR n [USS9Vs0sH oU "U5_M nnU(a6UVVs/sHunnU(aSU-OSU4PM nnnUR5 O/nU(a][UR55H@upVU bXZ;aXh;a XUSnXunn nURU(aUOU U45 MB URS5nURRU(aUS:HOURS5 URnU"S XS-5 U(a<U"S RUVVs/sHupVS US [U5S 3PM snn55 U"S5 UbU"[XUS55 SUlUR"R/5 gs snnfs snfs snnfs snnf)Nc&URSS5$)Nrr)r)ros r)r)C14NWriterTarget._start..s!''#q/r(rEzxmlns:xmlnsrz+{http://www.w3.org/XML/1998/namespace}spacepreserverrr1rrGrHrT)rrrrrrrrMsortrhrrrr_escape_attrib_c14nrrr)r7r+rrrrQrPrresolved_namesr7qattrs attr_namer parse_qnamero parsed_qnamesr8r9r] attr_qnamespace_behaviourrs r)r&C14NWriterTarget._starts    *u&+kkmTmdaq@S@S7STQTmET  !151J1J:1V VE:. JJu   ' ' 311%8F!'I!,E.u558<8Q8QRW8XXu 5 5) "( Fkk 4: 153453qKN*53 4 $2#1KC'-F"'3?#1  NN I u{{}-%!+!:M%Q&78;A-:-=* Is  *A!FG . ))$QR ##-)rrrrrrrrrs r)r C14NWriterTarget.commentsw""      ?? KK  __ KKM d-d34C89 KK r(ctUR(agUR(aURS5 O2UR(a!UR(aUR 5 URU(aSUS[ U5S3OSUS35 UR(dURS5 gg)Nrz)rrrrrrr)r7rrs r)rC14NWriterTarget.pis     ?? KK  __ KKM :>b,T232 6bPRO U KK r()rrrrrrrrrrrrrrrrrrD)r"r#r$r%r&r9reversedrrrrrrrrr&rr rr'r!r(r)rrsj, %"&$#$# J4<& a#HJ$!# 210"C"J   r(rc SU;aURSS5nSU;aURSS5nSU;aURSS5nSU;aURSS5nU$![[4a [U5 gf=f) Nrzr{rr|rr}r r~rs r)rrs) $;<<W-D $;<<V,D $;<<V,D 4<<<g.D ~ &)"4()sA!A$$BBcjSU;aURSS5nSU;aURSS5nSU;aURSS5nSU;aURSS5nS U;aURS S 5nS U;aURS S 5nU$![[4a [U5 gf=f) Nrzr{rr|rHrrz rz rrr~rs r)rrs) $;<<W-D $;<<V,D $;<<X.D 4<<<g.D 4<<<g.D 4<<<g.D ~ &)"4()sBBB21B2)r)_set_factoriesrDr)z r)@r&__all__rrrorRr$rcollections.abcr"rr1rrr r rrrrr rrcontextmanagerrr rKrirgrrrr5r6rJrNrhrr%rrrrr r rrrrrrrrcompileUNICODErprrrrrv _elementtreerrr!r(r)rs!P (       # ^^B $&$  +"+"`b/b/N /+/+b;z0(d 0(d    !*-2$*38(.(,16(, %3! ) )8 )!T"&0b''" !%&* &/l <~77t",  $vvth?h?Z7tt7<**\2::>DDD)&). 3K+712  s% E<<FFPK! u::-__pycache__/ElementPath.cpython-313.opt-1.pycnu[ Mi6SSKr\R"S5rSSjrSrSrSrSrSrS r S r S r S r \\\ \ \ \ S .r 0r"SS5rSSjrSSjrSSjrSSjrg)Nz`('[^']*'|\"[^\"]*\"|::|//?|\.\.|\(\)|!=|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@!=\s]+)|\s+c## U(aURS5OSnSn[RU5H~nUupVU(agUSS:wa^SU;a3URSS5upxU(d[eUSX<SU<34v O!U(aU(dUSU<SU<34v OUv SnMuUv US :HnM g![a [ SU-5Sef=f7f) NFr{:}z!prefix %r not found in prefix map@)getxpath_tokenizer_refindallsplitKeyError SyntaxError) pattern namespacesdefault_namespaceparsing_attributetokenttypetagprefixuris # UH!nT"URT5(dMUv M# g7frr+)r resultelem _isinstance_strs rselect_prepare_tag..selectvs&txx..Js, ,z{}*c3v># UH.nURnT"UT5(dMUSS:wdM*Uv M0 g7f)Nrrr+)r r/r0el_tagr1r2s rr3r4|s6vt,,c1AJ 99 9r&r'c3># UH4nURnUT:XdT"UT5(dM%UTT:XdM0Uv M6 g7frr+) r r/r0r6r1r2no_nssuffixrs rr3r4s=S=K$=$=&-SYBYJs $?? ?r(r)c3v># UH.nURnT"UT5(dMUTT:XdM*Uv M0 g7frr+)r r/r0r6r1r2nsns_onlys rr3r4s6vt,,B1FJr7zinternal parser error, got ) isinstancestrslicelen RuntimeError)rr3r1r2r:r>r?r;s` @@@@@@r _prepare_tagrEps"CK f} @ M9  4 M+ RaE QRs6{lD)!"g   M RST  "Xc"g&   M8>??r$c^^USm[T5(a[T5mU4SjnU$TSSS:XaTSSmU4SjnU$)Nrc&>SnT"X"U55$)Nc36# UH nUShvN M gN 7frr*)r/r0s r select_child3prepare_child..select..select_childs"D#OO##  r*r r/rI select_tags rr3prepare_child..selects $g|F';< # UH"nUHnURT:XdMUv M M$ g7frr+r r/r0r"rs rr3rNs*Auu|s- -)r,rEnextrr3rMrs @@r prepare_childrTsS (C!#&  = M r7d?ab'C Mr$c SnU$)Nc36# UH nUShvN M gN 7frr*)r r/r0s rr3prepare_star..selectsDOO rKr*rSrr3s r prepare_starrYs Mr$c SnU$)Nc3$# UShvN gN7frr*)r r/s rr3prepare_self..selectss r*rXs r prepare_selfr]s  Mr$c^^U"5nUSS:XaSmOUS(dUSmO [S5e[T5(a[T5mU4SjnU$TSSS:XaTSSmU4SjnU$![a gf=f) Nr*rzinvalid descendantc&>SnT"X"U55$)Nc3`# UH$nUR5H nX!LdM Uv M M& g7frr)r/r0r"s rrI8prepare_descendant..select..select_childs)"D!YY[="#G)#s. .r*rLs rr3"prepare_descendant..selects $ g|F';< # UH%nURT5H nX2LdM Uv M M' g7frrbrQs rr3rds,3A}(s0 0) StopIterationrr,rErRs @@rprepare_descendantrgs Qx3 1XAh.//!#&  = M r7d?ab'C M5 sA++ A87A8c SnU$)Nc3l# [U5n0nUHnXB;dM X$nXS;dMSX5'Uv M g7fr)r#)r r/r result_mapr0parents rr3prepare_parent..selects?#G,  D!#)+)-J& L s 44 4r*rXs rprepare_parentrms ! Mr$c>^^^^ /n/nU"5nUSS:XaO[US:XaMUS(aUSSSS;a SUSSS4nURUS=(d S5 URUS5 MmS RU5nUS :Xa USmU4S jnU$US :XdUS :Xa"USmUSm UU 4SjnUU 4SjnSU;aU$U$US:Xa,[R"SUS5(d USmU4SjnU$US:Xd1US:Xd+US:XdUS:XaU[R"SUS5(d6USmUSm T(aUU 4SjnUU 4SjnO U 4SjnU 4SjnSU;aU$U$US:Xd US:XdUS:XaqUS:Xa#[ US5S- mTS:a [ S5eO@USS:wa [ S5eUS:Xa$[ US 5S- mTS":a [ S#5eOSmU4S$jnU$[ S%5e![a gf=f![a [ S!5ef=f)&Nrr])rrz'"'r<-rz@-c3P># UHnURT5cMUv M g7frr )r r/r0keys rr3!prepare_predicate..selects#88C=,J& &z@-='z@-!='c3V># UHnURT5T:XdMUv M g7frrs)r r/r0rtvalues rr3rus%88C=E)Js) )c3d># UH%nURT5=ncMUT:wdM!Uv M' g7frrs)r r/r0 attr_valuertrxs rselect_negated)prepare_predicate..select_negateds/"&((3-/J<uATJs 00 0z!=z\-?\d+$c3P># UHnURT5cMUv M g7fr)find)r r/r0rs rr3rus#99S>-Jrvz.='z.!='z-='z-!='c3># UHEnURT5H-nSRUR55T:XdM(Uv MC MG g7fNr)r joinitertextr r/r0r"rrxs rr3rusB"D!\\#.771::<0E9"&J!/# ;AAc3># UHEnURT5H-nSRUR55T:wdM(Uv MC MG g7fr)iterfindrrrs rr{r|"sB"D!]]3/771::<0E9"&J!0#rc3r># UH,nSRUR55T:XdM(Uv M. g7frrrr r/r0rxs rr3ru),"Dwwt}}/58" #'7 7c3r># UH,nSRUR55T:wdM(Uv M. g7frrrs rr{r|-rrz-()z-()-zXPath position >= 1 expectedlastzunsupported functionr8zunsupported expressionr(z)XPath offset from last() must be negativec3># [U5nUH:nX#n[URUR55nUTULaUv M:M< g![[ 4a MRf=f7fr)r#listr r IndexErrorr)r r/rr0rkelemsindexs rr3ruEsl'0J'-F !9:EU|t+" , #H-s(A'4A A'A$ A'#A$$A'zinvalid predicate)rfappendrrematchintr ValueError) rSr signature predicater3r{rrtrrxs @@@@rprepare_predicatersII  FE 8s?  H   8a! -q!B'EqS)q"  "IDl  Fi72l"   "&!2~>>CYq\ B Bl  EY&0 % 9#6HHZ166l"   "  " # #"&!2~>>C9-f1D   ! %)Eqy!"@AA|v%!"899F"@ ! -1E2:%&QRR  ) **M   h"@%&>??@sG6>H6 HHH)rr_.z..z//[c\rSrSrSrSrSrg)_SelectorContexti^NcXlgrr)selfrs r__init___SelectorContext.__init__`s r$r)__name__ __module__ __qualname____firstlineno__rr__static_attributes__r*r$rrr^s Jr$rcUSSS:XaUS-nU4nU(a%U[[UR555- n[UnU/n[U5nUH n U "X5nM U$![a [ [5S:a[R 5 USSS:Xa [S5e[[X55RnU"5nO![a gf=f/nUR[US"XV55 O![a [S5Sef=fU"5nUSS:XaU"5nO![a Of=fMhU[U'GNf=f) Nr</r_drz#cannot use absolute path on elementrz invalid path)tuplesorteditems_cacherrCclearrrr__next__rfropsr) r0pathr cache_keyselectorrSrr/r r3s rrrhsp BCyCczIU6*"2"2"4566 %)$2VFt$G( M9 % v;  LLN 8s?CD DOD56?? FE    <E!H d :;  <!.1t; < 8s? FE   %y-%sr A))A#E CE C#E"C##E*!D  E D##E'D?>E? E  E E  EEc.[[XU5S5$r)rSrr0rrs rr~r~s Z0$ 77r$c,[[XU55$r)rrrs rr r s Z0 11r$c[[XU55nURcgUR$![a Us$f=fr)rSrtextrf)r0rdefaultrs rfindtextrsCHT45 99 yy s"1 1 AAr)NN)rcompiler rr#r,rErTrYr]rgrmrrrrrr~r rr*r$rrsv ZZ   -00&R&  > n+b        'X8 2 r$PK!\T@*__pycache__/__init__.cpython-313.opt-2.pycnu[ MiEg)Nr9/opt/alt/python313/lib64/python3.13/xml/etree/__init__.pyrsrPK! u::'__pycache__/ElementPath.cpython-313.pycnu[ Mi6SSKr\R"S5rSSjrSrSrSrSrSrS r S r S r S r \\\ \ \ \ S .r 0r"SS5rSSjrSSjrSSjrSSjrg)Nz`('[^']*'|\"[^\"]*\"|::|//?|\.\.|\(\)|!=|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@!=\s]+)|\s+c## U(aURS5OSnSn[RU5H~nUupVU(agUSS:wa^SU;a3URSS5upxU(d[eUSX<SU<34v O!U(aU(dUSU<SU<34v OUv SnMuUv US :HnM g![a [ SU-5Sef=f7f) NFr{:}z!prefix %r not found in prefix map@)getxpath_tokenizer_refindallsplitKeyError SyntaxError) pattern namespacesdefault_namespaceparsing_attributetokenttypetagprefixuris # UH!nT"URT5(dMUv M# g7frr+)r resultelem _isinstance_strs rselect_prepare_tag..selectvs&txx..Js, ,z{}*c3v># UH.nURnT"UT5(dMUSS:wdM*Uv M0 g7f)Nrrr+)r r/r0el_tagr1r2s rr3r4|s6vt,,c1AJ 99 9r&r'c3># UH4nURnUT:XdT"UT5(dM%UTT:XdM0Uv M6 g7frr+) r r/r0r6r1r2no_nssuffixrs rr3r4s=S=K$=$=&-SYBYJs $?? ?r(r)c3v># UH.nURnT"UT5(dMUTT:XdM*Uv M0 g7frr+)r r/r0r6r1r2nsns_onlys rr3r4s6vt,,B1FJr7zinternal parser error, got ) isinstancestrslicelen RuntimeError)rr3r1r2r:r>r?r;s` @@@@@@r _prepare_tagrEps"CK f} @ M9  4 M+ RaE QRs6{lD)!"g   M RST  "Xc"g&   M8>??r$c^^USm[T5(a[T5mU4SjnU$TSSS:XaTSSmU4SjnU$)Nrc&>SnT"X"U55$)Nc36# UH nUShvN M gN 7frr*)r/r0s r select_child3prepare_child..select..select_childs"D#OO##  r*r r/rI select_tags rr3prepare_child..selects $g|F';< # UH"nUHnURT:XdMUv M M$ g7frr+r r/r0r"rs rr3rNs*Auu|s- -)r,rEnextrr3rMrs @@r prepare_childrTsS (C!#&  = M r7d?ab'C Mr$c SnU$)Nc36# UH nUShvN M gN 7frr*)r r/r0s rr3prepare_star..selectsDOO rKr*rSrr3s r prepare_starrYs Mr$c SnU$)Nc3$# UShvN gN7frr*)r r/s rr3prepare_self..selectss r*rXs r prepare_selfr]s  Mr$c^^U"5nUSS:XaSmOUS(dUSmO [S5e[T5(a[T5mU4SjnU$TSSS:XaTSSmU4SjnU$![a gf=f) Nr*rzinvalid descendantc&>SnT"X"U55$)Nc3`# UH$nUR5H nX!LdM Uv M M& g7frr)r/r0r"s rrI8prepare_descendant..select..select_childs)"D!YY[="#G)#s. .r*rLs rr3"prepare_descendant..selects $ g|F';< # UH%nURT5H nX2LdM Uv M M' g7frrbrQs rr3rds,3A}(s0 0) StopIterationrr,rErRs @@rprepare_descendantrgs Qx3 1XAh.//!#&  = M r7d?ab'C M5 sA++ A87A8c SnU$)Nc3l# [U5n0nUHnXB;dM X$nXS;dMSX5'Uv M g7fr)r#)r r/r result_mapr0parents rr3prepare_parent..selects?#G,  D!#)+)-J& L s 44 4r*rXs rprepare_parentrms ! Mr$c>^^^^ /n/nU"5nUSS:XaO[US:XaMUS(aUSSSS;a SUSSS4nURUS=(d S5 URUS5 MmS RU5nUS :Xa USmU4S jnU$US :XdUS :Xa"USmUSm UU 4SjnUU 4SjnSU;aU$U$US:Xa,[R"SUS5(d USmU4SjnU$US:Xd1US:Xd+US:XdUS:XaU[R"SUS5(d6USmUSm T(aUU 4SjnUU 4SjnO U 4SjnU 4SjnSU;aU$U$US:Xd US:XdUS:XaqUS:Xa#[ US5S- mTS:a [ S5eO@USS:wa [ S5eUS:Xa$[ US 5S- mTS":a [ S#5eOSmU4S$jnU$[ S%5e![a gf=f![a [ S!5ef=f)&Nrr])rrz'"'r<-rz@-c3P># UHnURT5cMUv M g7frr )r r/r0keys rr3!prepare_predicate..selects#88C=,J& &z@-='z@-!='c3V># UHnURT5T:XdMUv M g7frrs)r r/r0rtvalues rr3rus%88C=E)Js) )c3d># UH%nURT5=ncMUT:wdM!Uv M' g7frrs)r r/r0 attr_valuertrxs rselect_negated)prepare_predicate..select_negateds/"&((3-/J<uATJs 00 0z!=z\-?\d+$c3P># UHnURT5cMUv M g7fr)find)r r/r0rs rr3rus#99S>-Jrvz.='z.!='z-='z-!='c3># UHEnURT5H-nSRUR55T:XdM(Uv MC MG g7fNr)r joinitertextr r/r0r"rrxs rr3rusB"D!\\#.771::<0E9"&J!/# ;AAc3># UHEnURT5H-nSRUR55T:wdM(Uv MC MG g7fr)iterfindrrrs rr{r|"sB"D!]]3/771::<0E9"&J!0#rc3r># UH,nSRUR55T:XdM(Uv M. g7frrrr r/r0rxs rr3ru),"Dwwt}}/58" #'7 7c3r># UH,nSRUR55T:wdM(Uv M. g7frrrs rr{r|-rrz-()z-()-zXPath position >= 1 expectedlastzunsupported functionr8zunsupported expressionr(z)XPath offset from last() must be negativec3># [U5nUH:nX#n[URUR55nUTULaUv M:M< g![[ 4a MRf=f7fr)r#listr r IndexErrorr)r r/rr0rkelemsindexs rr3ruEsl'0J'-F !9:EU|t+" , #H-s(A'4A A'A$ A'#A$$A'zinvalid predicate)rfappendrrematchintr ValueError) rSr signature predicater3r{rrtrrxs @@@@rprepare_predicatersII  FE 8s?  H   8a! -q!B'EqS)q"  "IDl  Fi72l"   "&!2~>>CYq\ B Bl  EY&0 % 9#6HHZ166l"   "  " # #"&!2~>>C9-f1D   ! %)Eqy!"@AA|v%!"899F"@ ! -1E2:%&QRR  ) **M   h"@%&>??@sG6>H6 HHH)rr_.z..z//[c\rSrSrSrSrSrg)_SelectorContexti^NcXlgrr)selfrs r__init___SelectorContext.__init__`s r$r)__name__ __module__ __qualname____firstlineno__rr__static_attributes__r*r$rrr^s Jr$rcUSSS:XaUS-nU4nU(a%U[[UR555- n[UnU/n[U5nUH n U "X5nM U$![a [ [5S:a[R 5 USSS:Xa [S5e[[X55RnU"5nO![a gf=f/nUR[US"XV55 O![a [S5Sef=fU"5nUSS:XaU"5nO![a Of=fMhU[U'GNf=f) Nr</r_drz#cannot use absolute path on elementrz invalid path)tuplesorteditems_cacherrCclearrrr__next__rfropsr) r0pathr cache_keyselectorrSrr/r r3s rrrhsp BCyCczIU6*"2"2"4566 %)$2VFt$G( M9 % v;  LLN 8s?CD DOD56?? FE    <E!H d :;  <!.1t; < 8s? FE   %y-%sr A))A#E CE C#E"C##E*!D  E D##E'D?>E? E  E E  EEc.[[XU5S5$r)rSrr0rrs rr~r~s Z0$ 77r$c,[[XU55$r)rrrs rr r s Z0 11r$c[[XU55nURcgUR$![a Us$f=fr)rSrtextrf)r0rdefaultrs rfindtextrsCHT45 99 yy s"1 1 AAr)NN)rcompiler rr#r,rErTrYr]rgrmrrrrrr~r rr*r$rrsv ZZ   -00&R&  > n+b        'X8 2 r$PK!F؉(__pycache__/cElementTree.cpython-313.pycnu[ MiRSSK7 g))*N)xml.etree.ElementTree=/opt/alt/python313/lib64/python3.13/xml/etree/cElementTree.pyrs $rPK!\ElementInclude.pyonu[ V~gc@shddlZddlmZdZedZedZdefdYZdd Z dd Z dS( iNi(t ElementTrees!{http://www.w3.org/2001/XInclude}tincludetfallbacktFatalIncludeErrorcBseZRS((t__name__t __module__(((s=/opt/alt/python27/lib64/python2.7/xml/etree/ElementInclude.pyR>scCsat|O}|dkr3tj|j}n$|j}|rW|j|}nWdQX|S(Ntxml(topenRtparsetgetroottreadtdecode(threfRtencodingtfiletdata((s=/opt/alt/python27/lib64/python2.7/xml/etree/ElementInclude.pytdefault_loaderMs  cCs|dkrt}nd}x|t|kr||}|jtkr|jd}|jdd}|dkr|||}|dkrtd||fntj|}|jr|jpd|j|_n|||3s    PK!lZ __init__.pycnu[ V~gc@sdS(N((((s7/opt/alt/python27/lib64/python2.7/xml/etree/__init__.pyttPK!\ElementInclude.pycnu[ V~gc@shddlZddlmZdZedZedZdefdYZdd Z dd Z dS( iNi(t ElementTrees!{http://www.w3.org/2001/XInclude}tincludetfallbacktFatalIncludeErrorcBseZRS((t__name__t __module__(((s=/opt/alt/python27/lib64/python2.7/xml/etree/ElementInclude.pyR>scCsat|O}|dkr3tj|j}n$|j}|rW|j|}nWdQX|S(Ntxml(topenRtparsetgetroottreadtdecode(threfRtencodingtfiletdata((s=/opt/alt/python27/lib64/python2.7/xml/etree/ElementInclude.pytdefault_loaderMs  cCs|dkrt}nd}x|t|kr||}|jtkr|jd}|jdd}|dkr|||}|dkrtd||fntj|}|jr|jpd|j|_n|||3s    PK!wElementPath.pyonu[ V~gc@sddlZejdZddZdZdZdZdZdZ d Z d Z ied 6ed 6ed 6e d6e d6e d6Z iZ dddYZddZddZddZdddZdS(iNsY('[^']*'|"[^"]*"|::|//?|\.\.|\(\)|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@=\s]+)|\s+ccsxtj|D]}|d}|r|ddkrd|kryH|jdd\}}|sltn|dd|||ffVWqtk rtd|qXq|VqWdS(Niit{t:s{%s}%ss!prefix %r not found in prefix map(txpath_tokenizer_retfindalltsplittKeyErrort SyntaxError(tpatternt namespacesttokenttagtprefixturi((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pytxpath_tokenizerIs " ! cCs^|j}|dkrZi|_}x5|jjD]!}x|D]}|||tjd |d r>|dfd}|S|dkrtjd |d r|d|dfd}|S|dks|dks|dkrQ|dkrt|ddnl|ddkrtdn|dkr8yt|ddWq>tk r4tdq>Xndfd}|StddS(Nit]is'"t'it-ts@-c3s2x+|D]#}|jdk r|VqqWdS(N(tgetR(RRR(tkey(s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pyRs s@-='c3s2x+|D]#}|jkr|VqqWdS(N(R&(RRR(R'tvalue(s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pyRs s\d+$c3s2x+|D]#}|jdk r|VqqWdS(N(tfindR(RRR(R (s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pyRs s-='c3sSxL|D]D}x;|jD]*}dj|jkr|VPqqWqWdS(NR%(Rtjointitertext(RRRR(R R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pyRs  s-()s-()-tlastsunsupported functionisunsupported expressionc3syt|}xf|D]^}y>||}t|j|j}||krV|VnWqttfk rpqXqWdS(N(RtlistRR t IndexErrorR(RRRRR telems(tindex(s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pyRs    sinvalid predicate(tappendR*tretmatchtintRt ValueError(RR t signaturet predicateR((R0R'R R(s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pytprepare_predicatesV      # #  $    R%Rt.s..s//t[t_SelectorContextcBseZdZdZRS(cCs ||_dS(N(R(tselfR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pyt__init__sN(t__name__t __module__RRR=(((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pyR;sc Csn|ddkr|d}nyt|}Wntk r4ttdkrZtjn|d dkrytdntt||j}|}g}xy"|jt |d||Wnt k rtdnXy)|}|ddkr |}nWqt k r"PqXqW|t|;s.      P  $ PK!lZ __init__.pyonu[ V~gc@sdS(N((((s7/opt/alt/python27/lib64/python2.7/xml/etree/__init__.pyttPK!̹ElementTree.pycnu[ V~gc@s>dddddddddd d d d d dddddddgZdZddlZddlZddlZdefdYZyddlmZWne k reZnXd e fdYZ dZ defdYZ e ZZidZed Zed!ZeZd efd"YZdefd#YZed$Zd%Zd&d'd(d)d*d+d,d-d.d/d0d1d2f ZyeeZWnek rnXd3Zd4Zied56ed66ed76Zd8Zid5d96d6d:6d;d<6d=d>6d?d@6dAdB6dCdD6Z dEZ!dFZ"dGZ#dHZ$dIZ%eedJZ&eedKZ'dLZ(edMZ)eedNZ*dOefdPYZ+edQZ,edRZ-e,Z.edSZ/defdTYZ0dUgZ1defdVYZ2e2Z3yddWl4m5Z5e5edX(treprRtid(R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt__repr__scCs|j||S(N(t __class__(RRR,((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt makeelementscCs;|j|j|j}|j|_|j|_||(|S(N(R4RR,Rttail(RR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR*s   cCs t|jS(N(tlenR-(R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt__len__scCs)tjdtddt|jdkS(NsyThe behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.t stacklevelii(twarningstwarnt FutureWarningR6R-(R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt __nonzero__s cCs |j|S(N(R-(Rtindex((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt __getitem__ scCs||j||D]6}x|jD] }|VqWW|jrD|jVqDqDWdS(N(RR(t basestringRRtitertextR5(RRRQts((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRUs      N(!R%R&RRR,RR5R/R2R4R*R7R<R>R?R@RARBRDRERGRR R$R"RIRJRMRNROR!RSRU(((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRs<             cKs<|j}|j||j||}|j||S(N(R*R+R4RA(tparentRR,R.R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR s    cCstt}||_|S(N(RRR(RR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR"s  cCs6tt}||_|r2|jd||_n|S(Nt (RR R(ttargetRR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR 1s   cBs/eZddZdZdZdZRS(cCs&|rd||f}n||_dS(Ns{%s}%s(R(Rt text_or_uriR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR/EscCs|jS(N(R(R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt__str__IscCs t|jS(N(thashR(R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt__hash__KscCs2t|tr"t|j|jSt|j|S(N(R(R tcmpR(Rtother((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt__cmp__MsN(R%R&RR/R[R]R`(((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR Ds   cBseZd d dZdZdZd dZd dZd dZd dZ d d dZ d dZ d d Z d d d d d Z d ZRS( cCs#||_|r|j|ndS(N(t_rootR(RRtfile((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR/_s cCs|jS(N(Ra(R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pytgetrootkscCs ||_dS(N(Ra(RR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt_setrootuscCst}t|ds-t|d}t}nzb|sKtdt}nx*|jd}|sgPn|j|qNW|j|_ |j SWd|r|jnXdS(NtreadtrbRYi( tFalseR)topentTrueRRRetfeedtcloseRa(Rtsourcetparsert close_sourcetdata((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRs   cCs|jj|S(N(RaR!(RR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR!scCs)tjdtddt|j|S(NsbThis method will be removed in future versions. Use 'tree.iter()' or 'list(tree.iter())' instead.R8i(R9R:RRR#R!(RR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRSs cCsJ|d dkr7d|}tjd|tddn|jj||S(Nit/t.sThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rR8i(R9R:R;RaR(RRHR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRs cCsM|d dkr7d|}tjd|tddn|jj|||S(NiRpRqsThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rR8i(R9R:R;RaR (RRHRR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR s cCsJ|d dkr7d|}tjd|tddn|jj||S(NiRpRqsThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rR8i(R9R:R;RaR$(RRHR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR$s cCsJ|d dkr7d|}tjd|tddn|jj||S(NiRpRqsThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rR8i(R9R:R;RaR"(RRHR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR"s c Cs=|sd}n|tkr.td|nt|drF|}nt|d}|j}|s|dkryd}qd}n>|s|dkr|d kr|dkr|d|qn|d krt||j|n>t|j||\}} t|} | ||j||| ||k r9|j ndS( Ntxmlsunknown method %rtwritetwbtc14nsutf-8sus-asciis$ R(sutf-8sus-ascii( t _serializet ValueErrorR)RhRsRt_serialize_textRat _namespacesRk( Rtfile_or_filenametencodingtxml_declarationtdefault_namespacetmethodRbRstqnamesRt serialize((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRss0            cCs|j|ddS(NR~Ru(Rs(RRb((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt write_c14n8sN(R%R&RR/RcRdRR!RSRR R$R"RsR(((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR]s        c sidd6ir&d       $     c Css|j}|j}|tkr8|dt||n|tkr^|dt||n||}|dkr|r|t||nx|D]}t||||dqWn|d||j}|s|r|rNxet |jddD]E\} } | r!d| } n|d| j |t | |fqWnx~t |D]m\} } t | t r| j} nt | t r|| j} nt | |} |d|| | fq[Wn|st|rC|d |r|t||nx$|D]}t||||dqW|d |d n |d |jro|t|j|ndS( Ns stRt:s xmlns%s="%s"s %s="%s"t>s(RRRt_encodeR Rt _escape_cdatat_serialize_xmlROtsortedRt_escape_attribR(R R6R5( RsRR{RRRRRQROtvtk((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRsP                tareatbasetbasefonttbrtcoltframethrtimgtinputtisindextlinktmetatparamc Cs|j}|j}|tkr8|dt||n?|tkr^|dt||n||}|dkr|r|t||nx|D]}t||||dqWn|d||j}|s|r|rNxet|jddD]E\} } | r!d| } n|d| j |t | |fqWnx~t|D]m\} } t | t r| j} nt | t r|| j} nt | |} |d|| | fq[Wn|d |j} |r/| d ks| d kr|t||q/|t||nx$|D]}t||||dq6W| tkrw|d |d n|jr|t|j|ndS( Ns sRRKcSs|dS(Ni((R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRRRs xmlns%s="%s"s %s="%s"Rtscripttstyles;s       U      D /  2           b   M  PK!ܤElementTree.pyonu[ V~gc@s>dddddddddd d d d d dddddddgZdZddlZddlZddlZdefdYZyddlmZWne k reZnXd e fdYZ dZ defdYZ e ZZidZed Zed!ZeZd efd"YZdefd#YZed$Zd%Zd&d'd(d)d*d+d,d-d.d/d0d1d2f ZyeeZWnek rnXd3Zd4Zied56ed66ed76Zd8Zid5d96d6d:6d;d<6d=d>6d?d@6dAdB6dCdD6Z dEZ!dFZ"dGZ#dHZ$dIZ%eedJZ&eedKZ'dLZ(edMZ)eedNZ*dOefdPYZ+edQZ,edRZ-e,Z.edSZ/defdTYZ0dUgZ1defdVYZ2e2Z3yddWl4m5Z5e5edX(treprRtid(R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt__repr__scCs|j||S(N(t __class__(RRR,((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt makeelementscCs;|j|j|j}|j|_|j|_||(|S(N(R4RR,Rttail(RR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR*s   cCs t|jS(N(tlenR-(R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt__len__scCs)tjdtddt|jdkS(NsyThe behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.t stacklevelii(twarningstwarnt FutureWarningR6R-(R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt __nonzero__s cCs |j|S(N(R-(Rtindex((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt __getitem__ scCs||j||D]6}x|jD] }|VqWW|jrD|jVqDqDWdS(N(RR(t basestringRRtitertextR5(RRRQts((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRUs      N(!R%R&RRR,RR5R/R2R4R*R7R<R>R?R@RARBRDRERGRR R$R"RIRJRMRNROR!RSRU(((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRs<             cKs<|j}|j||j||}|j||S(N(R*R+R4RA(tparentRR,R.R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR s    cCstt}||_|S(N(RRR(RR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR"s  cCs6tt}||_|r2|jd||_n|S(Nt (RR R(ttargetRR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR 1s   cBs/eZddZdZdZdZRS(cCs&|rd||f}n||_dS(Ns{%s}%s(R(Rt text_or_uriR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR/EscCs|jS(N(R(R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt__str__IscCs t|jS(N(thashR(R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt__hash__KscCs2t|tr"t|j|jSt|j|S(N(R(R tcmpR(Rtother((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt__cmp__MsN(R%R&RR/R[R]R`(((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR Ds   cBseZd d dZdZdZd dZd dZd dZd dZ d d dZ d dZ d d Z d d d d d Z d ZRS( cCs#||_|r|j|ndS(N(t_rootR(RRtfile((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR/_s cCs|jS(N(Ra(R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pytgetrootkscCs ||_dS(N(Ra(RR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt_setrootuscCst}t|ds-t|d}t}nzb|sKtdt}nx*|jd}|sgPn|j|qNW|j|_ |j SWd|r|jnXdS(NtreadtrbRYi( tFalseR)topentTrueRRRetfeedtcloseRa(Rtsourcetparsert close_sourcetdata((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRs   cCs|jj|S(N(RaR!(RR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR!scCs)tjdtddt|j|S(NsbThis method will be removed in future versions. Use 'tree.iter()' or 'list(tree.iter())' instead.R8i(R9R:RRR#R!(RR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRSs cCsJ|d dkr7d|}tjd|tddn|jj||S(Nit/t.sThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rR8i(R9R:R;RaR(RRHR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRs cCsM|d dkr7d|}tjd|tddn|jj|||S(NiRpRqsThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rR8i(R9R:R;RaR (RRHRR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR s cCsJ|d dkr7d|}tjd|tddn|jj||S(NiRpRqsThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rR8i(R9R:R;RaR$(RRHR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR$s cCsJ|d dkr7d|}tjd|tddn|jj||S(NiRpRqsThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rR8i(R9R:R;RaR"(RRHR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR"s c Cs=|sd}n|tkr.td|nt|drF|}nt|d}|j}|s|dkryd}qd}n>|s|dkr|d kr|dkr|d|qn|d krt||j|n>t|j||\}} t|} | ||j||| ||k r9|j ndS( Ntxmlsunknown method %rtwritetwbtc14nsutf-8sus-asciis$ R(sutf-8sus-ascii( t _serializet ValueErrorR)RhRsRt_serialize_textRat _namespacesRk( Rtfile_or_filenametencodingtxml_declarationtdefault_namespacetmethodRbRstqnamesRt serialize((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRss0            cCs|j|ddS(NR~Ru(Rs(RRb((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyt write_c14n8sN(R%R&RR/RcRdRR!RSRR R$R"RsR(((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyR]s        c sidd6ir&d       $     c Css|j}|j}|tkr8|dt||n|tkr^|dt||n||}|dkr|r|t||nx|D]}t||||dqWn|d||j}|s|r|rNxet |jddD]E\} } | r!d| } n|d| j |t | |fqWnx~t |D]m\} } t | t r| j} nt | t r|| j} nt | |} |d|| | fq[Wn|st|rC|d |r|t||nx$|D]}t||||dqW|d |d n |d |jro|t|j|ndS( Ns stRt:s xmlns%s="%s"s %s="%s"t>s(RRRt_encodeR Rt _escape_cdatat_serialize_xmlROtsortedRt_escape_attribR(R R6R5( RsRR{RRRRRQROtvtk((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRsP                tareatbasetbasefonttbrtcoltframethrtimgtinputtisindextlinktmetatparamc Cs|j}|j}|tkr8|dt||n?|tkr^|dt||n||}|dkr|r|t||nx|D]}t||||dqWn|d||j}|s|r|rNxet|jddD]E\} } | r!d| } n|d| j |t | |fqWnx~t|D]m\} } t | t r| j} nt | t r|| j} nt | |} |d|| | fq[Wn|d |j} |r/| d ks| d kr|t||q/|t||nx$|D]}t||||dq6W| tkrw|d |d n|jr|t|j|ndS( Ns sRRKcSs|dS(Ni((R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementTree.pyRRRs xmlns%s="%s"s %s="%s"Rtscripttstyles;s       U      D /  2           b   M  PK!"cElementTree.pycnu[ V~gc@sddlTdS(i(t*N(t _elementtree(((s;/opt/alt/python27/lib64/python2.7/xml/etree/cElementTree.pyttPK!wElementPath.pycnu[ V~gc@sddlZejdZddZdZdZdZdZdZ d Z d Z ied 6ed 6ed 6e d6e d6e d6Z iZ dddYZddZddZddZdddZdS(iNsY('[^']*'|"[^"]*"|::|//?|\.\.|\(\)|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@=\s]+)|\s+ccsxtj|D]}|d}|r|ddkrd|kryH|jdd\}}|sltn|dd|||ffVWqtk rtd|qXq|VqWdS(Niit{t:s{%s}%ss!prefix %r not found in prefix map(txpath_tokenizer_retfindalltsplittKeyErrort SyntaxError(tpatternt namespacesttokenttagtprefixturi((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pytxpath_tokenizerIs " ! cCs^|j}|dkrZi|_}x5|jjD]!}x|D]}|||tjd |d r>|dfd}|S|dkrtjd |d r|d|dfd}|S|dks|dks|dkrQ|dkrt|ddnl|ddkrtdn|dkr8yt|ddWq>tk r4tdq>Xndfd}|StddS(Nit]is'"t'it-ts@-c3s2x+|D]#}|jdk r|VqqWdS(N(tgetR(RRR(tkey(s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pyRs s@-='c3s2x+|D]#}|jkr|VqqWdS(N(R&(RRR(R'tvalue(s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pyRs s\d+$c3s2x+|D]#}|jdk r|VqqWdS(N(tfindR(RRR(R (s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pyRs s-='c3sSxL|D]D}x;|jD]*}dj|jkr|VPqqWqWdS(NR%(Rtjointitertext(RRRR(R R((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pyRs  s-()s-()-tlastsunsupported functionisunsupported expressionc3syt|}xf|D]^}y>||}t|j|j}||krV|VnWqttfk rpqXqWdS(N(RtlistRR t IndexErrorR(RRRRR telems(tindex(s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pyRs    sinvalid predicate(tappendR*tretmatchtintRt ValueError(RR t signaturet predicateR((R0R'R R(s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pytprepare_predicatesV      # #  $    R%Rt.s..s//t[t_SelectorContextcBseZdZdZRS(cCs ||_dS(N(R(tselfR((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pyt__init__sN(t__name__t __module__RRR=(((s:/opt/alt/python27/lib64/python2.7/xml/etree/ElementPath.pyR;sc Csn|ddkr|d}nyt|}Wntk r4ttdkrZtjn|d dkrytdntt||j}|}g}xy"|jt |d||Wnt k rtdnXy)|}|ddkr |}nWqt k r"PqXqW|t|;s.      P  $ PK!"cElementTree.pyonu[ V~gc@sddlTdS(i(t*N(t _elementtree(((s;/opt/alt/python27/lib64/python2.7/xml/etree/cElementTree.pyttPK!WZDD __init__.pynu[PK!"/ElementTree.pynu[PK!xr)__pycache__/ElementInclude.cpython-36.pycnu[PK!Ib}&__pycache__/ElementPath.cpython-36.pycnu[PK!A3}})F__pycache__/__init__.cpython-36.opt-2.pycnu[PK!tH,__pycache__/ElementTree.cpython-36.opt-1.pycnu[PK!#}P-__pycache__/cElementTree.cpython-36.opt-2.pycnu[PK!xr/__pycache__/ElementInclude.cpython-36.opt-2.pycnu[PK!xr/__pycache__/ElementInclude.cpython-36.opt-1.pycnu[PK!Ib},__pycache__/ElementPath.cpython-36.opt-1.pycnu[PK!#}P'L__pycache__/cElementTree.cpython-36.pycnu[PK!1bmm,J__pycache__/ElementTree.cpython-36.opt-2.pycnu[PK!#}P-H__pycache__/cElementTree.cpython-36.opt-1.pycnu[PK!.&I__pycache__/ElementTree.cpython-36.pycnu[PK!Ib},__pycache__/ElementPath.cpython-36.opt-2.pycnu[PK!A3}}#__pycache__/__init__.cpython-36.pycnu[PK!A3}})__pycache__/__init__.cpython-36.opt-1.pycnu[PK!>)>>cElementTree.pynu[PK!Eg%%"ElementPath.pynu[PK!c8ElementInclude.pynu[PK![0xL__pycache__/ElementInclude.cpython-312.opt-2.pycnu[PK!99-m\__pycache__/ElementPath.cpython-312.opt-2.pycnu[PK!z-__pycache__/ElementTree.cpython-312.opt-2.pycnu[PK![0__pycache__/ElementInclude.cpython-312.opt-1.pycnu[PK!Eq7A7A'__pycache__/ElementTree.cpython-312.pycnu[PK!.__pycache__/cElementTree.cpython-312.opt-2.pycnu[PK!99-__pycache__/ElementPath.cpython-312.opt-1.pycnu[PK!.__pycache__/cElementTree.cpython-312.opt-1.pycnu[PK!99'__pycache__/ElementPath.cpython-312.pycnu[PK!7 $ V__pycache__/__init__.cpython-312.pycnu[PK!b>>-V__pycache__/ElementTree.cpython-312.opt-1.pycnu[PK!7 *__pycache__/__init__.cpython-312.opt-1.pycnu[PK![*__pycache__/ElementInclude.cpython-312.pycnu[PK!7 *צ__pycache__/__init__.cpython-312.opt-2.pycnu[PK!(__pycache__/cElementTree.cpython-312.pycnu[PK!H`##-Ҩ__pycache__/ElementTree.cpython-311.opt-2.pycnu[PK!W*R__pycache__/__init__.cpython-311.opt-2.pycnu[PK!CfY.X__pycache__/cElementTree.cpython-311.opt-1.pycnu[PK!~h@eCeC-__pycache__/ElementPath.cpython-311.opt-1.pycnu[PK!W$X __pycache__/__init__.cpython-311.pycnu[PK!xTK""0X __pycache__/ElementInclude.cpython-311.opt-2.pycnu[PK!CfY. __pycache__/cElementTree.cpython-311.opt-2.pycnu[PK!~h@eCeC' __pycache__/ElementPath.cpython-311.pycnu[PK!^Tkaa'^ __pycache__/ElementTree.cpython-311.pycnu[PK!}_}_- __pycache__/ElementTree.cpython-311.opt-1.pycnu[PK!CfY( __pycache__/cElementTree.cpython-311.pycnu[PK!W* " __pycache__/__init__.cpython-311.opt-1.pycnu[PK!xTK""0# __pycache__/ElementInclude.cpython-311.opt-1.pycnu[PK!~h@eCeC-5 __pycache__/ElementPath.cpython-311.opt-2.pycnu[PK!xTK""*Sy __pycache__/ElementInclude.cpython-311.pycnu[PK!\T@$ϋ __pycache__/__init__.cpython-313.pycnu[PK!PXX0 __pycache__/ElementInclude.cpython-313.opt-2.pycnu[PK!\T@*u __pycache__/__init__.cpython-313.opt-1.pycnu[PK!