2017 © Pedro Peláez
 

library array_to_xml

Convert php array to xml document

image

johnkzn/array_to_xml

Convert php array to xml document

  • Saturday, December 2, 2017
  • by konoha
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

array_to_xml

Install

"johnkzn/array_to_xml": "*"

Then do composer install., (*1)

Usage

$xml = new arrayToXml();
$array = [
    [
        'tag' => 'root',
        'elements' => [
            [
                'tag' => 'tag_1',
                'attributes' => [
                    'attr_1' => 'val_1'
                ],
                'content' => 'content_1',
            ],
            [
                'tag' => 'tag_2',
                'content' => 'content_2',
            ]
        ],
    ],
];
echo $xml->load($in)->out();

The Versions

02/12 2017

dev-master

9999999-dev

Convert php array to xml document

  Sources   Download

MIT License

The Requires

  • php >=5.4
  • ext-libxml *