本文整理匯總了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);