{"id":18790173,"url":"https://github.com/unistra/lxml-element-maker","last_synced_at":"2025-12-26T11:30:13.340Z","repository":{"id":45443432,"uuid":"74010687","full_name":"unistra/lxml-element-maker","owner":"unistra","description":"Transforms a python structure to an xml element with lxml","archived":false,"fork":false,"pushed_at":"2022-07-06T19:20:56.000Z","size":180,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-16T09:35:13.832Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unistra.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-17T09:20:01.000Z","updated_at":"2016-11-17T13:52:52.000Z","dependencies_parsed_at":"2022-09-10T02:21:13.262Z","dependency_job_id":null,"html_url":"https://github.com/unistra/lxml-element-maker","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unistra%2Flxml-element-maker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unistra%2Flxml-element-maker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unistra%2Flxml-element-maker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unistra%2Flxml-element-maker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unistra","download_url":"https://codeload.github.com/unistra/lxml-element-maker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239711300,"owners_count":19684574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T21:10:11.964Z","updated_at":"2025-12-26T11:30:13.271Z","avatar_url":"https://github.com/unistra.png","language":"Python","readme":"lxml-element-maker\n==================\n\n.. image:: https://api.travis-ci.org/unistra/lxml-element-maker.svg?branch=master\n    :target: https://travis-ci.org/unistra/lxml-element-maker\n    :alt: Build\n\n.. image:: http://coveralls.io/repos/unistra/lxml-element-maker/badge.png?branch=master\n    :target: http://coveralls.io/r/unistra/lxml-element-maker?branch=master\n    :alt: Coverage\n\n.. image:: https://img.shields.io/pypi/v/lxml-element-maker.svg\n    :target: https://pypi.python.org/pypi/lxml-element-maker\n    :alt: Version\n\n.. image:: https://img.shields.io/pypi/pyversions/lxml-element-maker.svg\n    :target: https://pypi.python.org/pypi/lxml-element-maker\n    :alt: Python Version\n\n.. image:: https://img.shields.io/pypi/status/lxml-element-maker.svg\n    :target: https://pypi.python.org/pypi/lxml-element-maker\n    :alt: Python Version\n\n.. image:: https://img.shields.io/pypi/l/lxml-element-maker.svg\n    :target: https://docs.python.org/3/license.html\n    :alt: Licence\n\nRequirements\n------------\n\n* python 3.4\n* lxml 3.4.4\n\nInstall\n-------\n\n.. code:: bash\n\n    pip install lxml-element-maker\n\nUsage\n-----\n\nTransforms a python structure to an xml element with lxml :\n\n.. code:: python\n\n    from element_maker.utils import XMLElement\n\n    structure = {'ArchiveTransferRequest':\n                          [\n                              [\n                                  {'Comment': [\n                                      ['baz'], {\"foo\": \"bar\"}\n                                  ]\n                                  },\n                                  {'Date': [\n                                      [\"2014-05-12T00:00:00Z\"]\n                                  ]\n                                  }\n                              ],\n                              {\"cars\": \"pizza\"}\n                          ]\n                          }\n    namespace = \"fr:gouv:culture:archivesdefrance:seda:v1.0\"\n    xml_element = XMLElement(namespace=self.namespace, **self.structure)()\n    # Test the element with an xsd schema\n    result = xml_element.pass_xsd(\"./tests/data/test.xsd\")\n    # Or test the element with an rng schema\n    result2 = xml_element.pass_rng(\"./tests/data/test.rng\")\n\nThe result is an xml :\n\n.. code:: xml\n\n    \u003cArchiveTransferRequest xmlns=\"fr:gouv:culture:archivesdefrance:seda:v1.0\" cars=\"pizza\"\u003e\n        \u003cComment foo=\"bar\"\u003ebaz\u003c/Comment\u003e\n        \u003cDate\u003e2014-05-12T00:00:00Z\u003c/Date\u003e\n    \u003c/ArchiveTransferRequest\u003e\n\n\nAuthors\n-------\n\n* Geoffroy : https://github.com/orgs/unistra/people/geoffroybeck\n* Morgan : https://github.com/orgs/unistra/people/dotmobo\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funistra%2Flxml-element-maker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funistra%2Flxml-element-maker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funistra%2Flxml-element-maker/lists"}