U
iÛfß/ ã @ sª d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z dd„ Z
i fdd „Zi fd
d„Zi fdd
„Z
dd„ ZG dd„ dejƒZG dd„ de jƒZddd„ZdS )znA library of useful helper classes to the SAX classes, for the
convenience of application and driver writers.
é Né )Úhandler)Ú xmlreaderc C s" | ¡ D ]\}}| ||¡} q| S )z2Replace substrings of a string using a dictionary.)ÚitemsÚreplace)ÚsÚdÚkeyÚvalue© r ú5/opt/alt/python38/lib64/python3.8/xml/sax/saxutils.pyÚ__dict_replace s r
c C s6 | dd¡} | dd¡} | dd¡} |r2t| |ƒ} | S )züEscape &, <, and > in a string of data.
You can escape other strings of data by passing a dictionary as
the optional entities parameter. The keys and values must all be
strings; each key will be replaced with its corresponding value.
ú&ú&ú>ú>ú<ú<©r r
©ÚdataZentitiesr r r Úescape s
r c C s2 | dd¡} | dd¡} |r&t| |ƒ} | dd¡S )a
Unescape &, <, and > in a string of data.
You can unescape other strings of data by passing a dictionary as
the optional entities parameter. The keys and values must all be
strings; each key will be replaced with its corresponding value.
r r r r r r r r r r r Úunescape" s
r c C sR |ddddœ–}t | |ƒ} d| krFd| kr