{"id":21871754,"url":"https://github.com/ericmorand/xml-to-array","last_synced_at":"2026-05-19T02:34:28.327Z","repository":{"id":56978830,"uuid":"172988292","full_name":"ericmorand/xml-to-array","owner":"ericmorand","description":"Plain and simple XML-to-array converter","archived":false,"fork":false,"pushed_at":"2019-03-04T20:19:19.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T17:11:17.746Z","etag":null,"topics":["php","xml"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/ericmorand/xml-to-array","language":"PHP","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/ericmorand.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}},"created_at":"2019-02-27T20:50:51.000Z","updated_at":"2019-03-04T20:17:12.000Z","dependencies_parsed_at":"2022-08-21T11:50:43.881Z","dependency_job_id":null,"html_url":"https://github.com/ericmorand/xml-to-array","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Fxml-to-array","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Fxml-to-array/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Fxml-to-array/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Fxml-to-array/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericmorand","download_url":"https://codeload.github.com/ericmorand/xml-to-array/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244877137,"owners_count":20524962,"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":["php","xml"],"created_at":"2024-11-28T06:15:10.670Z","updated_at":"2026-05-19T02:34:23.263Z","avatar_url":"https://github.com/ericmorand.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Plain and simple XML-to-array converter\n[![Latest Stable Version][packagist-image]][packagist-url] [![Build Status][travis-image]][travis-url]\n\nThis package provides a very simple converter to convert an XML string to an array. No attributes support, no complex logic, just a plain and simple converter that just works.\n\n## Installation\n\n```bash\ncomposer require ericmorand/xml-to-array\n```\n\n## Usage\n\n```php\n\u003c?php\n\nuse EricMorand\\XMLToArray;\n\n$converter = new XMLToArray\\Converter();\n$xml = \"\u003c?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?\u003e\n\u003cfoo\u003e\n    \u003cprop0/\u003e\n    \u003cprop1\u003efoo\u003c/prop1\u003e\n    \u003cprop2\u003e\u003c![CDATA[foo]]\u003e\u003c/prop2\u003e\n    \u003cprop3\u003e\n        \u003cprop0/\u003e\n        \u003cprop1\u003efoo\u003c/prop1\u003e\n        \u003cprop2\u003e\u003c![CDATA[foo]]\u003e\u003c/prop2\u003e\n    \u003c/prop3\u003e\n\u003c/foo\u003e\";\n\n$array = $converter-\u003econvertXML($xml);\n```\n\nBy running this code, `$array` would contain:\n\n```php\n[\n    'prop0' =\u003e null,\n    'prop1' =\u003e 'foo',\n    'prop2' =\u003e 'foo',\n    'prop3' =\u003e [\n        'prop0' =\u003e null,\n        'prop1' =\u003e 'foo',\n        'prop2' =\u003e 'foo'\n    ]\n]\n```\n\n[packagist-image]: https://poser.pugx.org/ericmorand/xml-to-array/version\n[packagist-url]: https://packagist.org/packages/ericmorand/xml-to-array\n[travis-image]: https://travis-ci.org/ericmorand/xml-to-array.svg?branch=master\n[travis-url]: https://travis-ci.org/ericmorand/xml-to-array\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericmorand%2Fxml-to-array","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericmorand%2Fxml-to-array","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericmorand%2Fxml-to-array/lists"}