\CodeIgniter\FormatXMLFormatter

XML data formatter

Summary

Methods
Properties
Constants
format()
No public properties found
No constants found
arrayToXML()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

format()

format(string|array  $data) : string|boolean

Takes the given data and formats it.

Parameters

string|array $data

Returns

string|boolean —

(XML string | false)

arrayToXML()

arrayToXML(array  $data, \SimpleXMLElement  $output) 

A recursive method to convert an array into a valid XML string.

Written by CodexWorld. Received permission by email on Nov 24, 2016 to use this code.

Parameters

array $data
\SimpleXMLElement $output