protected function fillXml(\SimpleXMLElement $element, $data)
    {
        foreach ($data as $key => $value) {
            if (is_array($value) || is_object($value)) {
                if (!is_numeric($key)) {
                    $child = $element->addChild($key);
                } else {
                    $child = $element;
                }
                
                $this->fillXml($child, $value);
            } else {
                $element->addChild($key, $value);
            }
        }
    }
protected function fillXml(\SimpleXMLElement $element, $data)
    {
        foreach ($data as $key => $value) {
            if (is_array($value) || is_object($value)) {
                if (!is_numeric($key)) {
                    $child = $element->addChild($key);
                } else {
                    $child = $element;
                }
                
                $this->fillXml($child, $value);
            } else {
                $element->addChild($key, $value);
            }
        }
    }
protected function fillXml ( \ SimpleXMLElement $ element , $ data ) { foreach ( $ data as $ key => $ value ) { if ( is_array ( $ value ) || is_object ( $ value ) ) { if ( ! is_numeric ( $ key ) ) { $ child = $ element -> addChild ( $ key ) ; } else { $ child = $ element ; } $ this -> fillXml ( $ child , $ value ) ; } else { $ element -> addChild ( $ key , $ value ) ; } } }
Builds a xml string out of the given array

@access public
@param \SimpleXMLElement $element
@param array|object $data
Builds a xml string out of the given array