{"id":20727937,"url":"https://github.com/mobilehero-archive/titanium-xml2json","last_synced_at":"2025-04-23T19:34:12.608Z","repository":{"id":42232844,"uuid":"195117648","full_name":"mobilehero-archive/titanium-xml2json","owner":"mobilehero-archive","description":"⭐  Axway Amplify module to convert XML to JSON for Appcelerator Titanium apps","archived":false,"fork":false,"pushed_at":"2023-05-17T04:35:21.000Z","size":1097,"stargazers_count":2,"open_issues_count":9,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T19:19:14.169Z","etag":null,"topics":["alloy","android","api-builder","appcelerator","axway","axway-amplify","axway-plugin","axway-sdk","axwaydev","brenton-house","ios","json","titanium","titanium-mobile","titanium-module","titanium-sdk","xml","xml2json"],"latest_commit_sha":null,"homepage":"https://brenton.house/saying-goodbye-to-axway-amplify-titanium-31a44f3671de","language":"JavaScript","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/mobilehero-archive.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-03T19:48:10.000Z","updated_at":"2022-01-11T03:25:56.000Z","dependencies_parsed_at":"2024-11-17T07:16:54.271Z","dependency_job_id":null,"html_url":"https://github.com/mobilehero-archive/titanium-xml2json","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobilehero-archive%2Ftitanium-xml2json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobilehero-archive%2Ftitanium-xml2json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobilehero-archive%2Ftitanium-xml2json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobilehero-archive%2Ftitanium-xml2json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mobilehero-archive","download_url":"https://codeload.github.com/mobilehero-archive/titanium-xml2json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250499939,"owners_count":21440718,"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":["alloy","android","api-builder","appcelerator","axway","axway-amplify","axway-plugin","axway-sdk","axwaydev","brenton-house","ios","json","titanium","titanium-mobile","titanium-module","titanium-sdk","xml","xml2json"],"created_at":"2024-11-17T04:34:53.142Z","updated_at":"2025-04-23T19:34:12.590Z","avatar_url":"https://github.com/mobilehero-archive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[//]: # (header-start)\n\n\u003ch1 align=\"center\"\u003e\n\t\u003ca href=\"https://blog.axway.com/mobile-apps/changes-to-application-development-services\"\u003e\n\t\tPreparing for end of Axway\n\t\u003c/a\u003e\t\n\u003c/h1\u003e\n\u003ch2 align=\"center\"\u003e\n\t👇 \u0026nbsp; support for Amplify Cloud and Mobile   \u0026nbsp; 👇\n\u003c/h2\u003e\t\n\n\u003ca href=\"https://brenton.house/saying-goodbye-to-axway-amplify-titanium-31a44f3671de\"\u003e\n\t\u003cp align=\"center\"\u003e\n\t\t\u003cimg src=\"https://cdn.secure-api.org/images/RIP-Axway-Amplify-Titanium.png\" alt=\"RIP Axway Amplify Titanium (2010 - 2022)\" width=\"80%\" /\u003e\n\t\u003c/p\u003e\n\u003c/a\u003e\t\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://blog.axway.com/mobile-apps/changes-to-application-development-services\"\u003e\n\t\t\t🪦 \u0026nbsp; RIP Axway Amplify Titanium (2010 - 2022)\n\t\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://blog.axway.com/mobile-apps/prepare-your-apps-for-appcelerator-end-of-support\"\u003e\n\t\t\t🪦 \u0026nbsp; RIP Axway Amplify Cloud Services (2012 - 2022)\n\t\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://blog.axway.com/mobile-apps/prepare-your-apps-for-appcelerator-end-of-support\"\u003e\n\t\t\t🪦 \u0026nbsp; RIP Axway Amplify Crash Analytics (2015 - 2022)\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n\u003chr\u003e\n\u003ch4 align=\"center\"\u003e\n🛑 \u0026nbsp;\u0026nbsp; \u003ca href=\"https://blog.axway.com/mobile-apps/prepare-your-apps-for-appcelerator-end-of-support\"\u003eAxway support for Amplify products has ended\u003c/a\u003e for most products related to mobile and cloud. \n\u003c/h4\u003e\n\n\u003ch4 align=\"center\"\u003e\nA few of the open-source versions of Axway Amplify products will live on after \u003ca href=\"\"\u003eAxway Amplify End-of-Life\u003c/a\u003e (EOL) announcements.  However, all closed-source projects and most open-source projects are now dead.  \n\t\u003c/h4\u003e\n\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\n\u003e 👉 \u0026nbsp;\u0026nbsp; A group of Axway employees, ex-Axway employees, and some developers from Titanium community have created a legal org and now officially decide all matters related to future of these products.  \n\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003chr\u003e\n\n\n## API FAQ:\n\n* [API Best Practices](https://brenton.house)\n* [What is API Security?](https://brenton.house/what-is-api-security-5ca8117d4911)\n* [OWASP Top 10 List for API Security](https://www.youtube.com/watch?v=GLVHDj0Cpg4)\n* [What is API Security?](https://brenton.house/what-is-api-security-5ca8117d4911)\n* [Top API Trends for 2022](https://brenton.house/top-10-api-integration-trends-for-2022-49b05f2ef299)\n* [What is a Frankenstein API?](https://brenton.house/what-is-a-frankenstein-api-4d6e59fca6)\n* [What is a Zombie API?](https://brenton.house/what-is-a-zombie-api-6e5427c39b6a)\n* [API Developer Experience](https://brenton.house/keys-to-winning-with-an-awesome-api-developer-experience-62dd2fa668f4)\n* [API Cybersecurity 101](https://brenton.house/what-is-api-security-5ca8117d4911)\n* [YouTube API Videos](https://youtube.com/brentonhouse)\n* [YouTube API Shorts Videos](https://youtube.com/apishorts)\n\n\u0026nbsp;\n\n[![Click to watch on Youtube](https://img.youtube.com/vi/GLVHDj0Cpg4/0.jpg)](https://www.youtube.com/watch?v=GLVHDj0Cpg4\u0026list=PLsy9MwYlG1pew6sktCAIFD5tbrXy9HUQ7  \"Click to watch on YouTube\")\n\n\n\u003e \u0026nbsp; [↑ Watch video on YouTube ↑](https://www.youtube.com/watch?v=GLVHDj0Cpg4\u0026list=PLsy9MwYlG1pew6sktCAIFD5tbrXy9HUQ7)\n\n\u0026nbsp;\n\n\n\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003chr\u003e\n\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\n[//]: # (header-end)\n\n# @titanium/xml2json\n\n[![@titanium/xml2json](https://img.shields.io/npm/v/@titanium/xml2json.png)](https://www.npmjs.com/package/@titanium/xml2json)\n[![Dependabot Status](https://api.dependabot.com/badges/status?host=github\u0026repo=brentonhouse/titanium-xml2json)](https://dependabot.com)\n\n\n\u003e Configurable, lightweight XML to JSON converter for Titanium native mobile apps.  Based on https://github.com/metatribal/xmlToJSON by [metatribal](https://github.com/metatribal)   \n\n\n* [📝 Description](#-description)\n\t* [Features](#features)\n* [🚀 Getting Started](#-getting-started)\n* [Usage](#usage)\n\t* [Options](#options)\n* [🔗 Related Links](#-related-links)\n* [📚 Learn More](#-learn-more)\n* [📣 Feedback](#-feedback)\n* [©️ Legal](#️-legal)\n\n## 📝 Description\n\n### Features\n\n* no external dependencies\n* small (~3kb minified)\n* simple parsing.  pass either a string or xml node and get back a javascript object ( use JSON.stringify(obj) to get the string representation )\n* supports attributes, text, cdata, namespaces, default namespaces, attributes with namespaces... you get the idea\n* lots of rendering of options\n* consistent, predictable output\n* browser support - it works on IE 9+, and nearly every version of Chrome, Safari, and Firefox as well as iOS, Android, and Blackberry.  (xmlToJSON will work for IE 7/8 as well if you set the xmlns option to false)\n\n\n## 🚀 Getting Started\n\nInstall using npm:\n\n```\nnpm install @titanium/xml2json\n```\n\n## Usage\n\n ```javascript\nconst xml2json = require('@titanium/xml2json');\nconst testString = '\u003cxml\u003e\u003ca\u003eIt Works!\u003c/a\u003e\u003c/xml\u003e';  \t// get some xml (string or document/node)\nconst result = xml2json.parseString(testString);\t// parse\n ```\n The (prettified) result of the above code is\n ```javascript\n{\n    \"xml\": {\n        \"a\": [\n            {\n                \"text\": \"It Works!\"\n            }\n        ]\n    }\n}\n```\n\n### Options\n\n```javascript\n// These are the option defaults\nvar options = { \n\tmergeCDATA: true,\t// extract cdata and merge with text nodes\n\tgrokAttr: true,\t\t// convert truthy attributes to boolean, etc\n\tgrokText: true,\t\t// convert truthy text/attr to boolean, etc\n\tnormalize: true,\t// collapse multiple spaces to single space\n\txmlns: true, \t\t// include namespaces as attributes in output\n\tnamespaceKey: '_ns', \t// tag name for namespace objects\n\ttextKey: '_text', \t// tag name for text nodes\n\tvalueKey: '_value', \t// tag name for attribute values\n\tattrKey: '_attr', \t// tag for attr groups\n\tcdataKey: '_cdata',\t// tag for cdata nodes (ignored if mergeCDATA is true)\n\tattrsAsObject: true, \t// if false, key is used as prefix to name, set prefix to '' to merge children and attrs.\n\tstripAttrPrefix: true, \t// remove namespace prefixes from attributes\n\tstripElemPrefix: true, \t// for elements of same name in diff namespaces, you can enable namespaces and access the nskey property\n\tchildrenAsArray: true \t// force children into arrays\n};\t\n\n// you can change the defaults by passing the parser an options object of your own\nvar myOptions = {\n\tmergeCDATA: false,\n\txmlns: false,\n\tattrsAsObject: false\n}\n\nresult = xml2json.parseString(xmlString, myOptions);\n```\n\nA more complicated example (with xmlns: true)\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cxml xmlns=\"http://default.namespace.uri\"\u003e\n    \u003ca\u003e\n        \u003cb id=\"1\"\u003eone\u003c/b\u003e\n        \u003cb id=\"2\"\u003e\u003c![CDATA[some \u003ccdata\u003e]]\u003etwo\u003c/b\u003e\n        \u003cns:c xmlns:ns=\"http://another.namespace\" ns:id=\"3\"\u003ethree\u003c/ns:c\u003e\n    \u003c/a\u003e\n\u003c/xml\u003e\n```\n\nresults in\n```javascript\n{\n        \"xml\": [{\n                \"attr\": {\n                        \"xmlns\": {\n                                \"value\": \"http://default.namespace.uri\"\n                        }\n                },\n                \"a\": [{\n                        \"b\": [{\n                                \"attr\": {\n                                        \"id\": {\n                                                \"value\": 1\n                                        }\n                                },\n                                \"text\": \"one\"\n                        }, {\n                                \"attr\": {\n                                        \"id\": {\n                                                \"value\": 2\n                                        }\n                                },\n                                \"text\": \"some \u003ccdata\u003etwo\"\n                        }],\n                        \"c\": [{\n                                \"attr\": {\n                                        \"xmlns:ns\": {\n                                                \"value\": \"http://another.namespace\"\n                                        },\n                                        \"id\": {\n                                                \"value\": 3\n                                        }\n                                },\n                                \"text\": \"three\"\n                        }]\n                }]\n        }]\n}\n```\n\n## 🔗 Related Links\n\n- [Titanium Mobile](https://www.npmjs.com/package/titanium) - Open-source tool for building powerful, cross-platform native apps with JavaScript.\n- [Alloy](https://www.npmjs.com/package/alloy) - MVC framework built on top of Titanium Mobile.\n- [Appcelerator](https://www.npmjs.com/package/appcelerator) - Installer for the Appcelerator Platform tool\n\n## 📚 Learn More\n\n- [Axway Developer Portal](https://developer.axway.com)\n\n## 📣 Feedback\n\nHave an idea or a comment?  [Join in the conversation here](https://github.com/brentonhouse/xml2json/issues)! \n\n## ©️ Legal\n\nAlloy is developed by Appcelerator and the community and is Copyright © 2012-Present by Appcelerator, Inc. All Rights Reserved.\n\nAlloy is made available under the Apache Public License, version 2. See their license file for more information.\n\nAppcelerator is a registered trademark of Appcelerator, Inc. Titanium is a registered trademark of Appcelerator, Inc. Please see the LEGAL information about using trademarks, privacy policy, terms of usage and other legal information at http://www.appcelerator.com/legal.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobilehero-archive%2Ftitanium-xml2json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmobilehero-archive%2Ftitanium-xml2json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobilehero-archive%2Ftitanium-xml2json/lists"}