overbid/arrayasxml

Simple class, array as xml converter.

Maintainers

Package info

github.com/overbid/arrayasxml

pkg:composer/overbid/arrayasxml

Statistics

Installs: 194

Dependents: 0

Suggesters: 0

Stars: 3

Open Issues: 0

v0.2 2015-07-18 11:23 UTC

This package is not auto-updated.

Last update: 2026-05-10 02:56:39 UTC


README

ArrayAsXml is a simple PHP class that converts array to XML.

Based on SimpleXML.

Installation

via Composer

composer require overbid/arrayasxml

Usage

Load the library

require 'vendor/autoload.php';
use Overbid\ArrayAsXml;

Set custom configuration:

$arrayAsXml = new ArrayAsXml();
$arrayAsXml->setEncoding('TIS-620');  //default UTF-8
$arrayAsXml->setRootName('main');     //defaul root

Creat XML

echo $arrayAsXml->save($data);