{"id":18400852,"url":"https://github.com/elomagic/xmltools","last_synced_at":"2025-04-12T16:58:58.383Z","repository":{"id":183159573,"uuid":"669703520","full_name":"elomagic/xmltools","owner":"elomagic","description":"XML Tools","archived":false,"fork":false,"pushed_at":"2025-04-09T14:45:42.000Z","size":192,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T15:45:20.047Z","etag":null,"topics":["converters","key-value","mapper","xml"],"latest_commit_sha":null,"homepage":"https://github.com/elomagic/xmltools","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elomagic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.MD","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-23T06:38:58.000Z","updated_at":"2025-04-09T14:45:43.000Z","dependencies_parsed_at":"2024-04-29T09:28:55.115Z","dependency_job_id":"3ead495e-c6aa-42f2-a39f-316504da546e","html_url":"https://github.com/elomagic/xmltools","commit_stats":null,"previous_names":["elomagic/xmltools"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elomagic%2Fxmltools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elomagic%2Fxmltools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elomagic%2Fxmltools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elomagic%2Fxmltools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elomagic","download_url":"https://codeload.github.com/elomagic/xmltools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248602111,"owners_count":21131612,"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":["converters","key-value","mapper","xml"],"created_at":"2024-11-06T02:37:05.183Z","updated_at":"2025-04-12T16:58:58.352Z","avatar_url":"https://github.com/elomagic.png","language":"Java","funding_links":["https://www.buymeacoffee.com/elomagic"],"categories":[],"sub_categories":[],"readme":"# xmltools - Tooling for managing XML\n\n---\n\n[![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/apache/maven.svg?label=License)][license]\n[![Maven Central](https://img.shields.io/maven-central/v/de.elomagic/xmltools.svg?label=Maven%20Central)](https://mvnrepository.com/artifact/de.elomagic/xmltools)\n[![build workflow](https://github.com/elomagic/xmltools/actions/workflows/maven.yml/badge.svg)](https://github.com/elomagic/xmltools/actions)\n[![GitHub issues](https://img.shields.io/github/issues-raw/elomagic/xmltools)](https://github.com/elomagic/xmltools/issues)\n[![GitHub tag](https://img.shields.io/github/tag/elomagic/xmltools.svg)](https://GitHub.com/elomagic/xmltools/tags/)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/elomagic/xmltools/graphs/commit-activity)\n[![Buymeacoffee](https://badgen.net/badge/icon/buymeacoffee?icon=buymeacoffee\u0026label)](https://www.buymeacoffee.com/elomagic)\n\n## What is this xmltools ? ###\n\nThis project is a Java library to ease up the handling of XML files.\n\n* Supports Java 17 or higher\n\n### Current limitations\n\n* XML mixed content not supported\n\n## Using the library\n\n### Maven\n\nAdd following dependency to your project. Replace the value of the attribute ```version``` according to the used\nversion in your project.\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cproject xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd\"\u003e\n\n    ...\n\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ede.elomagic\u003c/groupId\u003e\n            \u003cartifactId\u003exmltools\u003c/artifactId\u003e\n            \u003cversion\u003e[1,]\u003c/version\u003e\n        \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n    \n    ...\n    \n\u003c/project\u003e\n```\n\n## Using the API\n\n### Convert XML to key values\n\n```java\nimport de.elomagic.xmltools.Xml2KeyValueConverter;\n\nimport org.w3c.dom.Document;\n\nimport java.nio.file.Paths;\n\nclass Sample {\n\n  void example() throws Exception {\n    Xml2KeyValueConverter converter = new Xml2KeyValueConverter();\n    Map\u003cString, String\u003e map = converter.convert(Paths.get(\"document.xml\"));\n  }\n\n}\n```\n\n### Convert key values to XML\n\n```java\nimport de.elomagic.xmltools.KeyValue2XmlConverter;\nimport org.w3c.dom.Document;\nimport java.util.Map;\n\nclass Sample {\n\n    void example() throws Exception {\n        Map\u003cString, String\u003e map = Map.of(\n            \"de.elomagic.a\", \"1234\",\n            \"de.elomagic.b\", \"5678\"\n        );\n\n        KeyValue2XmlConverter converter = new KeyValue2XmlConverter();\n        Document document = converter.convert(map);\n    }\n\n}\n```\n\n## How to build artefact by myself?\n\nWhat you need is an installed JDK at least version 17 and [Apache Maven](https://maven.apache.org).\nThen clone this project to your local file system and execute `mvn clean install` in the project folder. After successful finish you find \nthe artefact in the `target` folder.\n\nNote, latest SNAPSHOTs can also be found under \"releases\" in the GitHub project page.\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Versioning\n\nVersioning follows the semantic of [Semantic Versioning 2.0.0](https://semver.org/)\n\n### Releasing new version / hotfix (Only for users who have repository permissions)\n\n#### Releasing new version / hotfix\n\nExecute following steps:\n\n* Are the [CHANGELOG.md](https://github.com/elomagic/xmltools/blob/main/CHANGELOG.md) up to date?\n* Check the version in the ```pom.xml``` and [CHANGELOG.md](https://github.com/elomagic/xmltools/blob/main/CHANGELOG.md)\n* Set release date in the [CHANGELOG.md](https://github.com/elomagic/xmltools/blob/main/CHANGELOG.md)\n* Execute GitHub action \"release\"\n\n## License\n\nThe xmltools is distributed under [Apache License, Version 2.0][license]\n\n[license]: https://www.apache.org/licenses/LICENSE-2.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felomagic%2Fxmltools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felomagic%2Fxmltools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felomagic%2Fxmltools/lists"}