protected function _convertArrayDataToXml(
        $value,
        $addCdata,
        Xml $xml,
        $key,
        $parent,
        array $attributes
    ) {
        $count      = count($value) === 1;
        $isNotEmpty = !empty($attributes);
        $exist      = array_key_exists(0, $value);

        if ($count && $isNotEmpty && $exist) {
            $children = $this->_appendDataToNode(
                $addCdata,
                $xml,
                $key,
                $value[0]
            );
        } else {
            $children = $xml->createElement(
                $this->_integerToStringKey($key)
            );
            $this->_arrayToXml($value, $xml, $addCdata, $children);
        }
        $parent->appendChild($children);

        foreach ($attributes as $attributeKey => $attributeValue) {
            $children->setAttribute($attributeKey, $attributeValue);
        }

        return $parent;
    }
protected function _convertArrayDataToXml(
        $value,
        $addCdata,
        Xml $xml,
        $key,
        $parent,
        array $attributes
    ) {
        $count      = count($value) === 1;
        $isNotEmpty = !empty($attributes);
        $exist      = array_key_exists(0, $value);

        if ($count && $isNotEmpty && $exist) {
            $children = $this->_appendDataToNode(
                $addCdata,
                $xml,
                $key,
                $value[0]
            );
        } else {
            $children = $xml->createElement(
                $this->_integerToStringKey($key)
            );
            $this->_arrayToXml($value, $xml, $addCdata, $children);
        }
        $parent->appendChild($children);

        foreach ($attributes as $attributeKey => $attributeValue) {
            $children->setAttribute($attributeKey, $attributeValue);
        }

        return $parent;
    }
protected function _convertArrayDataToXml ( $ value , $ addCdata , Xml $ xml , $ key , $ parent , array $ attributes ) { $ count = count ( $ value ) === 1 ; $ isNotEmpty = ! empty ( $ attributes ) ; $ exist = array_key_exists ( 0 , $ value ) ; if ( $ count && $ isNotEmpty && $ exist ) { $ children = $ this -> _appendDataToNode ( $ addCdata , $ xml , $ key , $ value [ 0 ] ) ; } else { $ children = $ xml -> createElement ( $ this -> _integerToStringKey ( $ key ) ) ; $ this -> _arrayToXml ( $ value , $ xml , $ addCdata , $ children ) ; } $ parent -> appendChild ( $ children ) ; foreach ( $ attributes as $ attributeKey => $ attributeValue ) { $ children -> setAttribute ( $ attributeKey , $ attributeValue ) ; } return $ parent ; }
convert array DATA value to xml format and return as xml object

@param array|string $value
@param string $addCdata
@param Xml $xml
@param string|integer $key
@param DOMElement $parent
@param array $attributes
@return DOMElement
convert array DATA value to xml format and return as xml object