\Array2XML

Summary

Methods
Properties
Constants
init()
createXML()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
convert()
getXMLRoot()
bool2str()
isValidTagName()
$xml
$encoding
N/A

Properties

$xml

$xml

$encoding

$encoding

Methods

init()

init( $version = '1.0',  $encoding = 'UTF-8',  $format_output = true) : mixed

Initialize the root XML node [optional]

Parameters

$version
$encoding
$format_output

Returns

mixed

createXML()

createXML(string  $node_name, array  $arr = array()) : \DomDocument

Convert an Array to XML

Parameters

string $node_name
  • name of the root node to be converted
array $arr
  • aray to be converterd

Returns

\DomDocument

convert()

convert(string  $node_name, array  $arr = array()) : \DOMNode

Convert an Array to XML

Parameters

string $node_name
  • name of the root node to be converted
array $arr
  • aray to be converterd

Returns

\DOMNode

getXMLRoot()

getXMLRoot() : mixed

Returns

mixed

bool2str()

bool2str(mixed  $v) : mixed

Parameters

mixed $v

Returns

mixed

isValidTagName()

isValidTagName(mixed  $tag) : mixed

Parameters

mixed $tag

Returns

mixed