semvec/pypi-packages huggingface dataset:
try-except 0.0.7
Cheating Try Except
Requires Python: >=3.6

# About
---

```py
def try_except(t: func, ex: Exception = None):
  try:
    result = t()
    return result
  except Exception as e:
    if isinstance(e,ex):
      return e
    elif ex is None:
      return None
    else:
      return False
```

^^^ This is literally all the code
lgpdXml 0.0.3
An simple and easy method to find and replace values of xml
Requires Python: >=3.6

# lgpdXml
## 1 - pip Install
```
pip install lgpdXml
```
## 2 - example find value of tag
```
#library
from lgpdXml import find, replace

#text
xml = '''<CNPJ>012.345.678/0001-01</CNPJ>
<NOMERAZAO>CLAUDIO TORRES ARBE</NOMERAZAO>
<CNPJ>001.001.001/0001-01</CNPJ>'''

#find using tag
nome = find(xml,'<NOMERAZAO>','</NOMERAZAO>')

#result
print(nome)

#all results of tag
cnpj = find(xml,'<CNPJ>','</CNPJ>')

#results
print(cnpj)

#specifying the index
cnpj = find(xml,'<CNPJ>','</CNPJ>')[1]

#result
print(cnpj)

#looking for tag that doesn't exist
email = find(xml,'<EMAIL>','</EMAIL>')

#result
print(email)

```

## 3 - example replace value
```
#library
from lgpdXml import find, replace

#text
xml = '''<CNPJ>012.345.678/0001-01</CNPJ>
<NOMERAZAO>CLAUDIO TORRES ARBE</NOMERAZAO>
<CNPJ>001.001.001/0001-01</CNPJ>'''

#find using tag
nome = find(xml,'<NOMERAZAO>','</NOMERAZAO>')[0]

#all results of tag
cnpj = find(xml,'<CNPJ>','</CNPJ>')[1]

#replace tag
xml = replace(xml,'****','<NOMERAZAO>',nome,'</NOMERAZAO>')

#replace tag
xml = replace(xml,'****','<CNPJ>',cnpj,'</CNPJ>')

#result
print(xml)
```