当前位置: 首页>>代码示例>>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;未经允许,请勿转载。