|
static | init ($version= '1.0', $encoding= 'UTF-8', $format_output=true) |
|
static & | createXML ($node_name, $arr=array(), $namespace=null) |
|
Definition at line 37 of file Array2XML.php.
static& createXML |
( |
|
$node_name, |
|
|
|
$arr = array() , |
|
|
|
$namespace = null |
|
) |
| |
|
static |
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
Definition at line 62 of file Array2XML.php.
64 $xml = self::getXMLRoot();
65 $xml->appendChild(self::convert($node_name, $arr, $namespace));
static init |
( |
|
$version = '1.0' , |
|
|
|
$encoding = 'UTF-8' , |
|
|
|
$format_output = true |
|
) |
| |
|
static |
Initialize the root XML node [optional]
- Parameters
-
$version | |
$encoding | |
$format_output | |
Definition at line 49 of file Array2XML.php.
51 self::$xml = new \DomDocument($version, $encoding);
52 self::$xml->formatOutput = $format_output;
53 self::$encoding = $encoding;
The documentation for this class was generated from the following file: