{"id":18981661,"url":"https://github.com/kryptonbutterfly/xmlconfig4j","last_synced_at":"2025-07-15T07:05:16.805Z","repository":{"id":44764206,"uuid":"188047358","full_name":"kryptonbutterfly/xmlConfig4J","owner":"kryptonbutterfly","description":"A Simple to use Library for Object de-/serialization to xml-Format","archived":false,"fork":false,"pushed_at":"2024-02-17T16:03:54.000Z","size":182,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-21T09:20:25.018Z","etag":null,"topics":["config","java","xml","xml-serialization"],"latest_commit_sha":null,"homepage":"","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/kryptonbutterfly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-22T13:43:25.000Z","updated_at":"2023-12-17T13:38:07.000Z","dependencies_parsed_at":"2022-09-08T09:11:16.528Z","dependency_job_id":"fcac3ce3-3dbc-4edd-9e3f-750db1df01af","html_url":"https://github.com/kryptonbutterfly/xmlConfig4J","commit_stats":null,"previous_names":["kryptonbutterfly/xmlconfig4j"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/kryptonbutterfly/xmlConfig4J","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kryptonbutterfly%2FxmlConfig4J","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kryptonbutterfly%2FxmlConfig4J/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kryptonbutterfly%2FxmlConfig4J/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kryptonbutterfly%2FxmlConfig4J/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kryptonbutterfly","download_url":"https://codeload.github.com/kryptonbutterfly/xmlConfig4J/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kryptonbutterfly%2FxmlConfig4J/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265416385,"owners_count":23761389,"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":["config","java","xml","xml-serialization"],"created_at":"2024-11-08T16:10:48.987Z","updated_at":"2025-07-15T07:05:16.663Z","avatar_url":"https://github.com/kryptonbutterfly.png","language":"Java","readme":"# xmlConfig4J [![Maven Package](https://github.com/kryptonbutterfly/xmlConfig4J/actions/workflows/maven-publish.yml/badge.svg)](https://github.com/kryptonbutterfly/xmlConfig4J/actions/workflows/maven-publish.yml)\n\nA Simple to use Library for Object de-/serialization to xml-Format\n\n## Getting the latest release\n\n```xml\n\u003crepository\u003e\n  \u003cid\u003egithub\u003c/id\u003e\n  \u003curl\u003ehttps://maven.pkg.github.com/kryptonbutterfly/maven-repo\u003c/url\u003e\n\u003c/repository\u003e\n```\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ekryptonbutterfly\u003c/groupId\u003e\n  \u003cartifactId\u003exml_config_4j\u003c/artifactId\u003e\n  \u003cversion\u003e3.2.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Download\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth align=\"center\"\u003ejava version\u003c/th\u003e\n    \u003cth\u003elibrary version\u003c/th\u003e\n    \u003cth align=\"center\"\u003eDownload\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e18+\u003c/td\u003e\n    \u003ctd\u003e3.2.0\u003c/td\u003e\n    \u003ctd align=\"center\" valign=\"center\"\u003e\u003ca href=\"https://github.com/kryptonbutterfly/xmlConfig4J/releases/download/v3.2.0/xmlConfig4J.jar\"\u003e\u003cb\u003exmlConfig4J.jar\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e18+\u003c/td\u003e\n    \u003ctd\u003e3.1.0\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/kryptonbutterfly/xmlConfig4J/releases/tag/v3.2.0\"\u003e\u003cimg width=\"28\" src=\"./md/exclamation_mark.svg\" title=\"DEPRECATED: Don't use this version, use v3.2.0 instead!\"/\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/kryptonbutterfly/xmlConfig4J/releases/download/v3.1.0/xmlConfig4J.jar\"\u003e\u003cb\u003exmlConfig4J.jar\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e18+\u003c/td\u003e\n    \u003ctd\u003e2.2.0\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/kryptonbutterfly/xmlConfig4J/releases/download/v2.2.0/xmlConfig4J.jar\"\u003e\u003cb\u003exmlConfig4J.jar\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e18+\u003c/td\u003e\n    \u003ctd\u003e2.1.0\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/kryptonbutterfly/xmlConfig4J/releases/download/v2.1.0/xmlConfig4J.jar\"\u003e\u003cb\u003exmlConfig4J.jar\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e18+\u003c/td\u003e\n    \u003ctd\u003e2.0.7\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/kryptonbutterfly/xmlConfig4J/releases/download/v2.0.7/xmlConfig4J.jar\"\u003e\u003cb\u003exmlConfig4J.jar\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e8+\u003c/td\u003e\n    \u003ctd\u003e2.0.4\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/kryptonbutterfly/xmlConfig4J/releases/download/v2.0.4/xmlConfig4J.jar\"\u003e\u003cb\u003exmlConfig4J.jar\u003c/b\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Dependencies\n\n#### version \u003e 2.1.0\n* use maven\n\n#### version 2.1.0\n* [**ReflectionUtils.jar**](https://github.com/kryptonbutterfly/ReflectionUtils/releases/download/v1.0.0/ReflectionUtils.jar)\n\n#### version 2.0.5 - 2.0.7\n–\n\n#### version \u003c 2.0.5\n* [apache / **commons-lang**](https://commons.apache.org/proper/commons-lang/download_lang.cgi)\n* [apache / **logging-log4j2**](https://logging.apache.org/log4j/2.x/download.html)\n\n## License\n\nThis project is licensed under Apache License 2.0 - see the [LICENSE](https://github.com/kryptonbutterfly/xmlConfig4J/blob/master/LICENSE) file for details\n\n## Contributing\n\nPlease do contribute!\nAny help with this project is greatly appreciated.\n\n## Example\n\nThe class TinyExample:\n\n```java\npublic class TinyExample extends FileConfig\n{\n  public TinyExample()\n  {\n    super(new File(\"./config.xml\"));\n  }\n  \n  @Value(\"List of favorite foods.\")\n  public ArrayList\u003cString\u003e favoriteFoods = genFavFoods();\n  \n  @Value\n  public int someNumber = 1337;\n  \n  @Value\n  public CustomClass cc = new CustomClass();\n\n  @Value\n  public HashMap\u003cString, String\u003e map = new HashMap\u003c\u003e();\n  {\n    map.put(\"A\", \"a\");\n    map.put(\"B\", null);\n    map.put(null, \"A\");\n  }\n  \n  @Value\n  public String[][] array = new String[][] {{\"Banana\", null}, null, {}, {\"Apple\", \"Orange\"}};\n  \n  @Value\n  public HashSet\u003cString\u003e set = new HashSet\u003c\u003e();\n  {\n    set.add(\"A\");\n    set.add(\"B\");\n    set.add(\"C\");\n    set.add(null);\n  }\n  \n  private ArrayList\u003cString\u003e genFavFoods()\n  {\n    ArrayList\u003cString\u003e list = new ArrayList\u003c\u003e();\n    list.add(\"Banana\");\n    list.add(\"Apple\");\n    list.add(null);\n    list.add(\"Cheese\");\n    return list;\n  }\n  \n  public static void main(String[] args) throws IOException\n  {\n    TinyExample config = new TinyExample();\n    if(config.exists())\n    {\n      config.load();\n      \n      System.out.println(\"List:\");\n      config.favoriteFoods.stream().map(s -\u003e \"\\t\" + s).forEach(System.out::println);\n      \n      System.out.printf(\"%nsomeNumber:%n\\t%s%n\", config.someNumber);\n      \n      System.out.printf(\"%nPi:%n\\t%s%n\", config.cc.pi);\n      \n      System.out.printf(\"%nMap:%n\");\n      config.map.entrySet().stream().map(s -\u003e \"\\t\" + s).forEach(System.out::println);\n      \n      System.out.printf(\"%nSet:%n\");\n      config.set.stream().map(s -\u003e \"\\t\" + s).forEach(System.out::println);\n      \n      System.out.printf(\"%nArray:%n%s%n\", Arrays.deepToString(config.array));\n    }\n    config.save();\n  }\n  \n  public static class CustomClass\n  {\n    @Value\n    public double pi = Math.PI;\n  }\n}\n```\ngenerates the config File ./config.xml :\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?\u003e\n\u003croot\u003e\n  \u003ctypes\u003e\n    \u003citem id=\"4\" name=\"java.util.HashSet\"/\u003e\n    \u003citem id=\"2\" name=\"java.util.HashMap\"/\u003e\n    \u003citem id=\"1\" name=\"java.lang.String\"/\u003e\n    \u003citem id=\"3\" name=\"[Ljava.lang.String;\"/\u003e\n    \u003citem id=\"0\" name=\"java.util.ArrayList\"/\u003e\n  \u003c/types\u003e\n  \u003cconfig\u003e\n    \u003cfavoriteFoods info=\"List of favorite foods.\" type=\"0\"\u003e\n      \u003citem type=\"1\" value=\"Banana\"/\u003e\n      \u003citem type=\"1\" value=\"Apple\"/\u003e\n      \u003citem null=\"true\"/\u003e\n      \u003citem type=\"1\" value=\"Cheese\"/\u003e\n    \u003c/favoriteFoods\u003e\n    \u003csomeNumber value=\"1337\"/\u003e\n    \u003ccc\u003e\n      \u003cpi value=\"3.141592653589793\"/\u003e\n    \u003c/cc\u003e\n    \u003cmap type=\"2\"\u003e\n      \u003citem\u003e\n        \u003ckey null=\"true\"/\u003e\n        \u003cvalue type=\"1\" value=\"A\"/\u003e\n      \u003c/item\u003e\n      \u003citem\u003e\n        \u003ckey type=\"1\" value=\"A\"/\u003e\n        \u003cvalue type=\"1\" value=\"a\"/\u003e\n      \u003c/item\u003e\n      \u003citem\u003e\n        \u003ckey type=\"1\" value=\"B\"/\u003e\n        \u003cvalue null=\"true\"/\u003e\n      \u003c/item\u003e\n    \u003c/map\u003e\n    \u003carray\u003e\n      \u003citem type=\"3\"\u003e\n        \u003citem type=\"1\" value=\"Banana\"/\u003e\n        \u003citem null=\"true\"/\u003e\n      \u003c/item\u003e\n      \u003citem null=\"true\"/\u003e\n      \u003citem type=\"3\"/\u003e\n      \u003citem type=\"3\"\u003e\n        \u003citem type=\"1\" value=\"Apple\"/\u003e\n        \u003citem type=\"1\" value=\"Orange\"/\u003e\n      \u003c/item\u003e\n    \u003c/array\u003e\n    \u003cset type=\"4\"\u003e\n      \u003citem null=\"true\"/\u003e\n      \u003citem type=\"1\" value=\"A\"/\u003e\n      \u003citem type=\"1\" value=\"B\"/\u003e\n      \u003citem type=\"1\" value=\"C\"/\u003e\n    \u003c/set\u003e\n  \u003c/config\u003e\n\u003c/root\u003e\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkryptonbutterfly%2Fxmlconfig4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkryptonbutterfly%2Fxmlconfig4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkryptonbutterfly%2Fxmlconfig4j/lists"}