{"id":17962164,"url":"https://github.com/skyzyx/transmogrifier","last_synced_at":"2025-08-16T10:31:35.454Z","repository":{"id":2373902,"uuid":"3338680","full_name":"skyzyx/transmogrifier","owner":"skyzyx","description":"Magically transmogrifies arrays into XML documents.","archived":false,"fork":false,"pushed_at":"2014-07-01T19:53:09.000Z","size":169,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-07T01:46:45.367Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/skyzyx.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":"2012-02-02T20:52:21.000Z","updated_at":"2023-04-06T06:55:02.000Z","dependencies_parsed_at":"2022-09-09T04:11:28.561Z","dependency_job_id":null,"html_url":"https://github.com/skyzyx/transmogrifier","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyzyx%2Ftransmogrifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyzyx%2Ftransmogrifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyzyx%2Ftransmogrifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyzyx%2Ftransmogrifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyzyx","download_url":"https://codeload.github.com/skyzyx/transmogrifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230030874,"owners_count":18162219,"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":[],"created_at":"2024-10-29T11:14:17.932Z","updated_at":"2024-12-16T21:45:40.059Z","avatar_url":"https://github.com/skyzyx.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Transmogrifier\n\nMagically transmogrifies arrays into XML documents.\n\n\n## Requirements\n### Required\nThe following software is **required** for Transmogrifier to run:\n\n* [PHP](http://php.net) 5.3.2+\n\n## Examples\nHere's how you use it:\n\n\tuse Transmogrifier\\Transmogrifier;\n\n\t$data = array(\n\t\t'book' =\u003e array(\n\t\t\tarray(\n\t\t\t\t'author' =\u003e 'Author0',\n\t\t\t\t'title' =\u003e 'Title0',\n\t\t\t\t'publisher' =\u003e 'Publisher0',\n\t\t\t\t'__attributes__' =\u003e array(\n\t\t\t\t\t'isbn' =\u003e '978-3-16-148410-0'\n\t\t\t\t)\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'author' =\u003e array('Author1', 'Author2'),\n\t\t\t\t'title' =\u003e 'Title1',\n\t\t\t\t'publisher' =\u003e 'Publisher1'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'__attributes__' =\u003e array(\n\t\t\t\t\t'isbn' =\u003e '978-3-16-148410-0'\n\t\t\t\t),\n\t\t\t\t'__content__' =\u003e 'Title2'\n\t\t\t)\n\t\t)\n\t);\n\n\techo Transmogrifier::toXML($data);\n\nWhich gives you the following:\n\n\t\u003c?xml version=\"1.0\"?\u003e\n\t\u003croot\u003e\n\t  \u003cbook isbn=\"978-3-16-148410-0\"\u003e\n\t    \u003cauthor\u003e\u003c![CDATA[Author0]]\u003e\u003c/author\u003e\n\t    \u003ctitle\u003e\u003c![CDATA[Title0]]\u003e\u003c/title\u003e\n\t    \u003cpublisher\u003e\u003c![CDATA[Publisher0]]\u003e\u003c/publisher\u003e\n\t  \u003c/book\u003e\n\t  \u003cbook\u003e\n\t    \u003cauthor\u003e\u003c![CDATA[Author1]]\u003e\u003c/author\u003e\n\t    \u003cauthor\u003e\u003c![CDATA[Author2]]\u003e\u003c/author\u003e\n\t    \u003ctitle\u003e\u003c![CDATA[Title1]]\u003e\u003c/title\u003e\n\t    \u003cpublisher\u003e\u003c![CDATA[Publisher1]]\u003e\u003c/publisher\u003e\n\t  \u003c/book\u003e\n\t  \u003cbook isbn=\"978-3-16-148410-0\"\u003e\u003c![CDATA[Title2]]\u003e\u003c/book\u003e\n\t\u003c/root\u003e\n\n\n## Installation\nDepending on your needs, there are a few different ways you can install Transmogrifier:\n\n### Bundle with Composer\nTo add Transmogrifier as a [Composer](https://github.com/composer/composer) dependency in your `composer.json` file:\n\n\t{\n\t\t\"require\": {\n\t\t\t\"skyzyx/transmogrifier\": \"\u003e=1.0\"\n\t\t}\n\t}\n\n### Install source from GitHub\nTo install the source code for Transmogrifier:\n\n\tgit clone git://github.com/skyzyx/transmogrifier.git\n\tcd transmogrifier\n\twget --quiet http://getcomposer.org/composer.phar\n\tphp composer.phar install\n\nAnd include it in your scripts:\n\n\trequire_once '/path/to/transmogrifier/src/Skyzyx/Components/Transmogrifier.php';\n\n### Install source from zip/tarball\nAlternatively, you can fetch a [tarball](https://github.com/skyzyx/transmogrifier/tarball/master) or [zipball](https://github.com/skyzyx/transmogrifier/zipball/master):\n\n    $ curl https://github.com/skyzyx/transmogrifier/tarball/master | tar xzv\n    (or)\n    $ wget https://github.com/skyzyx/transmogrifier/tarball/master -O - | tar xzv\n\nAnd include it in your scripts:\n\n\trequire_once '/path/to/transmogrifier/src/Skyzyx/Components/Transmogrifier.php';\n\n### Using a Class Loader\nIf you're using a class loader (e.g., [Symfony Class Loader](https://github.com/symfony/ClassLoader)) for [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md)-style class loading:\n\n\t$loader-\u003eregisterNamespace('Skyzyx\\\\Components\\\\Transmogrifier', 'path/to/vendor/skyzyx/transmogrifier/src/Skyzyx/Components/Transmogrifier');\n\n\n## Contributing\nTo view the list of existing [contributors](/skyzyx/transmogrifier/contributors), run the following command from the Terminal:\n\n\tgit shortlog -sne --no-merges\n\n### How?\nHere's the process for contributing:\n\n1. Fork Transmogrifier to your GitHub account.\n2. Clone your GitHub copy of the repository into your local workspace.\n3. Write code, fix bugs, and add tests with 100% code coverage.\n4. Commit your changes to your local workspace and push them up to your GitHub copy.\n5. You submit a GitHub pull request with a description of what the change is.\n6. The contribution is reviewed. Maybe there will be some banter back-and-forth in the comments.\n7. If all goes well, your pull request will be accepted and your changes are merged in.\n8. You will become \"Internet famous\" with anybody who runs `git shortlog` from the Terminal. :)\n\nTo simplify many aspects of development, we also have a `build.xml` for Phing. The easiest way to install Phing and any other dependencies is to install [Phix](http://phix-project.org/#install).\n\n\n## Testing\n[![Build Status](https://secure.travis-ci.org/skyzyx/transmogrifier.png)](http://travis-ci.org/skyzyx/transmogrifier)\n\nRequests strives to have 100% code-coverage of the library with an extensive set of tests. We're not quite there yet, but we're getting close.\n\n### Unit tests\nOur unit tests are written in [PHPT](http://qa.php.net/phpt_details.php) format. You can run them with either the PEAR Test Runner or with [PHPUnit](https://github.com/sebastianbergmann/phpunit/) 3.6+.\n\n\tcd tests/\n\tpear run-tests -r .\n\n...or...\n\n\tcd tests/\n\tphpunit .\n\n### Integration tests\nOur integration tests use PHPUnit.\n\n\tcd tests/\n\tphpunit .\n\n### Code Coverage\nYou can generate a code coverage report with the following command. You'll need the [Xdebug](http://xdebug.org) extension installed:\n\n\tcd tests/\n\tphpunit --coverage-html ./_coverage_report .\n\n\n## Authors, Copyright \u0026 Licensing\n\n* Copyright (c) 2010-2012 [Ryan Parman](http://ryanparman.com).\n* Copyright (c) 2012 Amazon.com, Inc. or its affiliates.\n\nSee also the list of [contributors](/skyzyx/transmogrifier/contributors) who participated in this project.\n\nLicensed for use under the terms of the [MIT license](http://www.opensource.org/licenses/mit-license.php).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyzyx%2Ftransmogrifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyzyx%2Ftransmogrifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyzyx%2Ftransmogrifier/lists"}