public function createXML($docs, $charset, $totalPages = null) { $charset = strtolower($charset); $xml = ''; $xml .= '<?xml version="1.0" encoding="' . $charset . '"?>'; $xml .= '<root>'; $xml .= '<docinfo ' . ACloudSysCoreXml::createAttribute('version', ACloudSysCoreDefine::ACLOUD_XML_VERSION) . ' ' . ACloudSysCoreXml::createAttribute('charset', $charset) . ' ' . ACloudSysCoreXml::createAttribute('totalpages', $totalPages) . ' />'; $xml .= '<docs>'; $xml .= ACloudSysCoreXml::buildXML($docs); $xml .= '</docs>'; $xml .= "</root>"; return $xml; }
public function dataFlowXmlFormat($docs, $charset, $totalPages = null) { $docs = ACloudSysCoreCommon::convert($docs, 'UTF-8', $charset); require_once ACLOUD_PATH . '/system/core/ACloudSysCoreXml.php'; return ACloudSysCoreXml::createXML($docs, 'UTF-8', $totalPages); }