當前位置: 首頁>>代碼示例>>PHP>>正文


PHP XMLWriter::writeDTD方法代碼示例

本文整理匯總了PHP中XMLWriter::writeDTD方法的典型用法代碼示例。如果您正苦於以下問題:PHP XMLWriter::writeDTD方法的具體用法?PHP XMLWriter::writeDTD怎麽用?PHP XMLWriter::writeDTD使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在XMLWriter的用法示例。


在下文中一共展示了XMLWriter::writeDTD方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: XMLWriter

    /*foreach( $matches as $match ) {
        echo "Found match: " . $match[0];
        //var_export( $match );
        echo "\n";
      }*/
} else {
    echo "Error finding structs!\n";
}
var_export($reg_info);
// Finally write the register info to an XML sheet
$xmlWriter = new XMLWriter();
//$xmlWriter->openMemory();
$xmlWriter->openURI($OUTPUT_FILE);
$xmlWriter->setIndent(true);
$xmlWriter->startDocument("1.0", "UTF-8");
$xmlWriter->writeDTD("model", NULL, "embsysregview.dtd");
$xmlWriter->startElement("model");
$xmlWriter->writeAttribute("chipname", $CHIPNAME);
$xmlWriter->writeElement("chip_description", $CHIPDESCRIPTION);
foreach ($reg_info as $group => $reg_groups) {
    $xmlWriter->startElement("group");
    $xmlWriter->writeAttribute("name", $group);
    $xmlWriter->writeAttribute("description", "");
    foreach ($reg_groups as $reg_group => $reg_group_members) {
        $xmlWriter->startElement("registergroup");
        $xmlWriter->writeAttribute("name", $reg_group);
        $xmlWriter->writeAttribute("description", "");
        foreach ($reg_group_members as $reg_member) {
            $xmlWriter->startElement("register");
            foreach ($reg_member as $reg_member_info => $reg_member_value) {
                $xmlWriter->writeAttribute($reg_member_info, $reg_member_value);
開發者ID:HappyASR,項目名稱:embsysregview,代碼行數:31,代碼來源:atmel_header_parser.php


注:本文中的XMLWriter::writeDTD方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。