\Gishiki\AlgorithmsXmlDomConstructor

Extends the DOMDocument to implement personal (utility) methods.

Summary

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

Methods

fromMixed()

fromMixed(array|string  $mixed, \DOMElement  $domElement = null) 

Constructs elements and texts from an array or string.

The array can contain an element's name in the index part and an element's text in the value part.

It can also creates an xml with the same element tagName on the same level.

ex: \verbatim

text hello world

\verbatim

Array should then look like: \verbatim array( "nodes" => array( "node" => array( 0 => "text", 1 => array( "field" => array ( 0 => "hello", 1 => "world", ), ), ), ), ); \endverbatim

Parameters

array|string $mixed

An array or string

\DOMElement $domElement

the element from where the array will be construct to