public function errorsAddToXML($encoding)
    {
        $dom = new DOMDocument('1.0', 'UTF-8');
        $root = $dom->createElement("Errors");
        $dom->appendChild($root);
        $xml = simplexml_import_dom($dom);
        $xmlerr = new SimpleXMLExtended($xml, $encoding);
        foreach ($this->_arrErrorList as $arrLine) {
//            $error = $xmlerr->addCData('Error', $arrLine['message']);
            $error = $xmlerr->addChild('Error');
            $error->addAttribute('Message', $arrLine['message']);
            $error->addAttribute('Function', $arrLine['command']);
        }

        return $xmlerr->getSimpleXmlElement();
    }
public function errorsAddToXML($encoding)
    {
        $dom = new DOMDocument('1.0', 'UTF-8');
        $root = $dom->createElement("Errors");
        $dom->appendChild($root);
        $xml = simplexml_import_dom($dom);
        $xmlerr = new SimpleXMLExtended($xml, $encoding);
        foreach ($this->_arrErrorList as $arrLine) {
//            $error = $xmlerr->addCData('Error', $arrLine['message']);
            $error = $xmlerr->addChild('Error');
            $error->addAttribute('Message', $arrLine['message']);
            $error->addAttribute('Function', $arrLine['command']);
        }

        return $xmlerr->getSimpleXmlElement();
    }
public function errorsAddToXML ( $ encoding ) { $ dom = new DOMDocument ( '1.0' , 'UTF-8' ) ; $ root = $ dom -> createElement ( "Errors" ) ; $ dom -> appendChild ( $ root ) ; $ xml = simplexml_import_dom ( $ dom ) ; $ xmlerr = new SimpleXMLExtended ( $ xml , $ encoding ) ; foreach ( $ this -> _arrErrorList as $ arrLine ) { //            $error = $xmlerr->addCData('Error', $arrLine['message']); $ error = $ xmlerr -> addChild ( 'Error' ) ; $ error -> addAttribute ( 'Message' , $ arrLine [ 'message' ] ) ; $ error -> addAttribute ( 'Function' , $ arrLine [ 'command' ] ) ; } return $ xmlerr -> getSimpleXmlElement ( ) ; }
add the errors to an existing xml document

@param String $encoding encoding

@return SimpleXmlElement
add the errors to an existing xml document