
XMLWriter::endDtdElement 메서드는 DTD 요소를 닫는 데 사용됩니다. 이 메서드를 사용하여 DTD를 닫는 방법은 다음과 같습니다.
#hostingforum.kr
php
$xmlWriter = new XMLWriter();
$xmlWriter->openURI("php://output");
$xmlWriter->startDTD("example", "-//Example//DTD Example 1.0//EN", "http://example.com/example.dtd");
$xmlWriter->endDtdElement();
$xmlWriter->endDocument();
$xmlWriter->flush();
이 코드에서, `endDtdElement` 메서드는 DTD 요소를 닫고 `endDocument` 메서드는 XML 문서를 닫습니다. `flush` 메서드는 XML 문서를 출력합니다.
2025-07-06 16:00