本文整理汇总了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);