function getWQDDataXML($row)
{
    $XML .= "<wqdfiledata>";
    $XML .= "<wqdfiledataseq>" . $row["wqdfiledataseq"] . "</wqdfiledataseq>";
    $XML .= "<wqdfolderseq>" . $row["wqdfolderseq"] . "</wqdfolderseq>";
    $XML .= "<wqdfiledatadated>" . $row["wqdfiledatadated"] . "</wqdfiledatadated>";
    $XML .= "<wqdfiledatareportno>" . $row["wqdfiledatareportno"] . "</wqdfiledatareportno>";
    $XML .= "<wqdfiledatachecksum>" . $row["wqdfiledatachecksum"] . "</wqdfiledatachecksum>";
    for ($i = 1; $i <= 15; $i++) {
        $val = $row["ch" . $i . "value"];
        $status = $row["ch" . $i . "status"];
        $xsi = getXSI($val);
        $XML .= "<ch" . $i . "value " . $xsi . ">" . $val . "</ch" . $i . "value>";
        $XML .= "<ch" . $i . "status " . $xsi . ">" . $status . "</ch" . $i . "status>";
    }
    $XML .= "</wqdfiledata>";
    return $XML;
}
Example #2
0
function getChannelConfigurationXML($cc)
{
    $XML .= "<channelconfiguration>";
    $XML .= "<configseq>" . $cc->getSeq() . "</configseq>";
    $XML .= "<folderseq>" . $cc->getFolderSeq() . "</folderseq>";
    $XML .= "<channelnumber>" . $cc->getChannelNumber() . "</channelnumber>";
    $XML .= "<channelname>" . $cc->getChannelName() . "</channelname>";
    $XML .= "<channelstatusflag " . getXSI($cc->getChannelStatusFlag()) . ">" . $cc->getChannelStatusFlag() . "</channelstatusflag>";
    $XML .= "<channelunit>" . utf8_encode($cc->getChannelUnit()) . "</channelunit>";
    $XML .= "</channelconfiguration>";
    return $XML;
}