{"id":13803816,"url":"https://github.com/hi5/XA","last_synced_at":"2025-05-13T16:32:33.670Z","repository":{"id":150288784,"uuid":"98015541","full_name":"hi5/XA","owner":"hi5","description":"XA - Save/Load AutoHotkey Arrays in XML format","archived":false,"fork":false,"pushed_at":"2020-09-06T12:51:58.000Z","size":6,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-20T09:15:44.012Z","etag":null,"topics":["arrays","autohotkey","autohotkey-arrays","data","objects","xml"],"latest_commit_sha":null,"homepage":"https://autohotkey.com/boards/viewtopic.php?f=6\u0026t=34849","language":"AutoHotkey","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/hi5.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-07-22T07:38:48.000Z","updated_at":"2023-12-19T13:03:06.000Z","dependencies_parsed_at":"2023-04-24T21:47:41.016Z","dependency_job_id":null,"html_url":"https://github.com/hi5/XA","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hi5%2FXA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hi5%2FXA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hi5%2FXA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hi5%2FXA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hi5","download_url":"https://codeload.github.com/hi5/XA/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253981938,"owners_count":21994363,"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":["arrays","autohotkey","autohotkey-arrays","data","objects","xml"],"created_at":"2024-08-04T01:00:38.139Z","updated_at":"2025-05-13T16:32:28.662Z","avatar_url":"https://github.com/hi5.png","language":"AutoHotkey","readme":"﻿# XA - Save/Load AutoHotkey Arrays in XML format\n\n**Introduction**\n\nXA was written by **trueski** and the original source can be found here http://www.autohotkey.com/board/topic/85461-ahk-l-saveload-arrays/  \n(The code posted there is no longer valid due to errors caused by upgrading the forum software.)\n\n* XA_CleanInvalidChars() has been added to remove invalid characters in XML.\n* Added InStr(XMLText,\"\u003c?xml\") and Try/Catch to prevent error when trying to read empty/faulty/non XML file (20200904)\n* Note this is for **AutoHotkey UNICODE only**\n* A XA version compatible with **AHK v2** can be found here https://www.autohotkey.com/boards/viewtopic.php?f=6\u0026t=72997 \n\n## Usage\n\n```ahk\n    XA_Save(\"Array\", Path) ; put variable name in quotes\n    XA_Load(Path)          ; the name of the variable containing the array is returned OR the value 1 in case of error \n```\n\n```autohotkey\nMyArray1:={\"a\":\"aa\",\"b\":\"bb\",\"c\":\"cc\"}\nMyArray2:=[\"a\",\"b\",\"c\"]\n\nXA_Save(\"MyArray1\", \"test1.xml\") ; see 1 below\n; to load use: \n; XA_Load(\"test1.xml\")\n; MsgBox % MyArray1[\"b\"] ; shows \"bb\"\n\nXA_Save(\"MyArray2\", \"test2.xml\") ; see 2 below\n; to load use: \n; XA_Load(\"test2.xml\")\n; MsgBox % MyArray2[2] ; shows \"b\" \n```\n\nresult of test1\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cMyArray1\u003e\n\t\u003ca\u003eaa\u003c/a\u003e\n\t\u003cb\u003ebb\u003c/b\u003e\n\t\u003cc\u003ecc\u003c/c\u003e\n\u003c/MyArray1\u003e\n```\n\nresult of test2\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cMyArray2\u003e\n\t\u003cInvalid_Name id=\"1\" ahk=\"True\"\u003ea\u003c/Invalid_Name\u003e\n\t\u003cInvalid_Name id=\"2\" ahk=\"True\"\u003eb\u003c/Invalid_Name\u003e\n\t\u003cInvalid_Name id=\"3\" ahk=\"True\"\u003ec\u003c/Invalid_Name\u003e\n\u003c/MyArray2\u003e\n```\n\nTo check for error \n```ahk\nif (XA_Load(\"file.xml\") = 1) ; the name of the variable containing the array is returned OR the value 1 in case of error \n\tMsgBox Error loading XML file.\n```\n\n\n### AutoHotkey forum discussion\n\nhttps://autohotkey.com/boards/viewtopic.php?f=6\u0026t=34849\n","funding_links":[],"categories":["Libraries"],"sub_categories":["\u003ca name=\"libraries-data-format\"\u003e\u003c/a\u003eData format"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhi5%2FXA","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhi5%2FXA","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhi5%2FXA/lists"}