\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 : 

Type

$encoding

$encoding : 

Type

Methods

init()

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

Initialize the root XML node [optional]

Parameters

$version
$encoding
$format_output

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() 

bool2str()

bool2str(  $v) 

Parameters

$v

isValidTagName()

isValidTagName(  $tag) 

Parameters

$tag