An simple and easy method to find and replace values of xml
Project description
lgpd_xml
1 - pip Install
pip install lgpdXml
2 - example replace value
#library
from lgpdXml import *
#text
xml = '''<name>john</name><uf>rn</uf><city>natal</city><age>31</age>'''
#call class
text = lgpdXml(xml)
#replace using tag
newText = text.replace('<city>','natal','</city>','parnamirim')
#result
print(newText)
3 - example find value of tag
#library
from lgpdXml import *
#text
xml = '''<name>john</name><uf>rn</uf><city>natal</city><age>31</age>'''
#call class
text = lgpdXml(xml)
#find using tag
searchVal = text.find('<uf>','</uf>')
#result
print(searchVal)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lgpdXml-0.0.2.tar.gz
(2.3 kB
view details)
Built Distribution
File details
Details for the file lgpdXml-0.0.2.tar.gz
.
File metadata
- Download URL: lgpdXml-0.0.2.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07efe3087dd88823d43ff069309e91a3d8edfc552c687b6b644df290791d61ab |
|
MD5 | 54082af38ae729b886a927f7d95fd2dc |
|
BLAKE2b-256 | 9f960b733fa2c805b6bc5e133d8c9fd602b478fe7057db6abf5f37598becd020 |
File details
Details for the file lgpdXml-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: lgpdXml-0.0.2-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bc0743cf4cd7739f61c12a62509a83664cee9890d435b0c85fe88772f33682e |
|
MD5 | aa0cd7827e128348478ed627c37bcc3d |
|
BLAKE2b-256 | b5ec8f4cd24bbc2874b848586236202a2339fdebc6800ed11501d8fcf39553bb |