Skip to main content

smartXML package enables you to read, search, manipulate, and write XML files with ease

Project description

smartXML

The smartXML package enables you to read, search, manipulate, and write XML files with ease.

The API is designed to be as simple as possible, but it will be enhanced according to usage and requests.


Usage Example

from pathlib import Path
from smartxml import SmartXML, TextOnlyComment

input_file = Path('./example.xml')
xml = SmartXML(input_file)

names = xml.find('students|student|firstName', only_one=False)

for name in names:
    if name.content == 'Bob':
        bob = name.parent
        bob.comment_out()

        header = TextOnlyComment('Bob is out')
        header.add_before(bob)

xml.write()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smartxml-1.0.0.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smartxml-1.0.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file smartxml-1.0.0.tar.gz.

File metadata

  • Download URL: smartxml-1.0.0.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for smartxml-1.0.0.tar.gz
Algorithm Hash digest
SHA256 362b04723eb8ddcb2a637f99f2084eb6f29837d1523aa7bbca0f4e3d3511605e
MD5 dcbedafa43e4950e2b2b27d97bbee889
BLAKE2b-256 9174308d385a12131077f1a55968b0fb21c6bfb4ecd6615b61e15b12236f6aad

See more details on using hashes here.

File details

Details for the file smartxml-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: smartxml-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for smartxml-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd80f12ff5a0a49780b4a995099559cd990298cdbbc516126192a9a9ebb117f1
MD5 cf500eac9de69abf4416d71016d7c9a1
BLAKE2b-256 bb5b3dc2db983ccf5bd667dbd9f8d4d38745836d1f668f1f044466dcce93d1b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page