Skip to main content

A simple conversion of an lxml.objectify element to a python dictionary.

Project description

lxml_to_dict

conversor lxml a dict

Descripción

  • Esta es una actualizacion al paquete oficial de Criva [https://github.com/CRiva/lxml_to_dict] para uso con python 3.9

Instalación

pip install lxml-to-dict-total

Uso básico

from lxml_to_dict import lxml_to_dict
 
lxml_to_dict(<the lxml.objectfy.Element>)

root = objectify.Element("root")            # <root></root>
b = objectify.SubElement(root, "b")         # <root><b></b></root>
b = objectify.SubElement(root, "b")         # <root><b></b><b></b></root>
a = objectify.SubElement(root, "a")         # <root><b></b><b></b><a></a></root>
lxml_to_dict(root)                          # {'root': {'b': None, 'b1': None, 'a': None}}

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

lxml_to_dict_total-1.0.0.tar.gz (7.6 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: lxml_to_dict_total-1.0.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for lxml_to_dict_total-1.0.0.tar.gz
Algorithm Hash digest
SHA256 976910bfc5d788034e574a5839c166ea52f6f6c9872ff71aaff55039c3ac8625
MD5 ecec14b1880f0bfdee0b6e6977c365a0
BLAKE2b-256 88b608168f61e7e74a20189bcb9f543fcc4ac6a85e469d680afe93e4af6dbab4

See more details on using hashes here.

Supported by

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