PHP Class LSS\XML2Array

See Array2XML: http://www.lalit.org/lab/convert-php-array-to-xml-with-attributes Author : Lalit Patel Website: http://www.lalit.org/lab/convert-xml-to-array-in-php-xml2array License: Apache License 2.0 http://www.apache.org/licenses/LICENSE-2.0 Version: 0.1 (07 Dec 2011) Version: 0.2 (04 Mar 2012) Fixed typo 'DomDocument' to 'DOMDocument' Usage: $array = XML2Array::createArray($xml);
Afficher le fichier Open project: openlss/lib-array2xml Class Usage Examples

Protected Properties

Свойство Type Description
$encoding
$prefix_attributes
$xml

Méthodes publiques

Méthode Description
createArray ( $input_xml, $options ) : DOMDocument Convert an XML to Array
init ( $version = '1.0', $encoding = 'UTF-8', $format_output = true ) Initialize the root XML node [optional]

Méthodes protégées

Méthode Description
convert ( mixed $node ) : mixed Convert an Array to XML
getXMLRoot ( ) * Get the root XML node, if there isn't one, create it.

Method Details

convert() protected static méthode

Convert an Array to XML
protected static convert ( mixed $node ) : mixed
$node mixed - XML as a string or as an object of DOMDocument
Résultat mixed

createArray() public static méthode

Convert an XML to Array
public static createArray ( $input_xml, $options ) : DOMDocument
Résultat DOMDocument

getXMLRoot() protected static méthode

* Get the root XML node, if there isn't one, create it.
protected static getXMLRoot ( )

init() public static méthode

Initialize the root XML node [optional]
public static init ( $version = '1.0', $encoding = 'UTF-8', $format_output = true )
$version
$encoding
$format_output

Property Details

$encoding protected_oe static_oe property

protected static $encoding

$prefix_attributes protected_oe static_oe property

protected static $prefix_attributes

$xml protected_oe static_oe property

protected static $xml