src/Service/ioService.php
public function exportXML($objName)
    {
        // get the current UI bizobj
        /* @var $bizForm EasyForm */
        $bizForm = Openbizx::getObject($objName);    // get the existing bizform object
        $bizObj = $bizForm->getDataObj();

        $recList = array();
        $bizObj->fetchRecords("", $recList, -1, -1, false);

        $xmlString = "<?xml version='1.0' standalone='yes'?>\n";
        $xmlString .= "<BizDataObj Name=\"" . $bizObj->objectName . "\">\n";
        foreach ($recList as $rec) {
            $xmlRecord = "\t<Record>\n";
            foreach ($rec as $fld => $val) {
                $xmlRecord .= "\t\t<Field Name=\"$fld\" Value=\"$val\" />\n";
            }
            $xmlRecord .= "\t</Record>\n";
            $xmlString .= $xmlRecord;
        }
        $xmlString .= "</BizDataObj>";

        // output variables
        $name = str_replace(".", "_", $bizObj->objectName) . ".xml";
        $size = strlen($xmlString);
        $type = "text/plain";

        ob_clean();

        header("Cache-Control: "); // leave blank to avoid IE errors
        header("Pragma: "); // leave blank to avoid IE errors
        header("Content-Disposition: attachment; filename=\"$name\"");
        header("Content-length: $size");
        header("Content-type: $type");

        echo $xmlString;

        exit;
    }
public function exportXML($objName)
    {
        // get the current UI bizobj
        /* @var $bizForm EasyForm */
        $bizForm = Openbizx::getObject($objName);    // get the existing bizform object
        $bizObj = $bizForm->getDataObj();

        $recList = array();
        $bizObj->fetchRecords("", $recList, -1, -1, false);

        $xmlString = "<?xml version='1.0' standalone='yes'?>\n";
        $xmlString .= "<BizDataObj Name=\"" . $bizObj->objectName . "\">\n";
        foreach ($recList as $rec) {
            $xmlRecord = "\t<Record>\n";
            foreach ($rec as $fld => $val) {
                $xmlRecord .= "\t\t<Field Name=\"$fld\" Value=\"$val\" />\n";
            }
            $xmlRecord .= "\t</Record>\n";
            $xmlString .= $xmlRecord;
        }
        $xmlString .= "</BizDataObj>";

        // output variables
        $name = str_replace(".", "_", $bizObj->objectName) . ".xml";
        $size = strlen($xmlString);
        $type = "text/plain";

        ob_clean();

        header("Cache-Control: "); // leave blank to avoid IE errors
        header("Pragma: "); // leave blank to avoid IE errors
        header("Content-Disposition: attachment; filename=\"$name\"");
        header("Content-length: $size");
        header("Content-type: $type");

        echo $xmlString;

        exit;
    }
Export to XML format (print to browser)

@param string $objName
@return void