cmXMLWriter: add Doctype() method

This commit is contained in:
Daniel Pfeifer 2015-07-16 23:06:44 +02:00 committed by Brad King
parent dd27e31351
commit d740762181
2 changed files with 9 additions and 0 deletions

View File

@ -92,6 +92,13 @@ void cmXMLWriter::CData(std::string const& data)
this->Output << "<![CDATA[" << data << "]]>"; this->Output << "<![CDATA[" << data << "]]>";
} }
void cmXMLWriter::Doctype(const char* doctype)
{
this->CloseStartElement();
this->ConditionalLineBreak(!this->IsContent, this->Elements.size());
this->Output << "<!DOCTYPE " << doctype << ">";
}
void cmXMLWriter::ProcessingInstruction(const char* target, const char* data) void cmXMLWriter::ProcessingInstruction(const char* target, const char* data)
{ {
this->CloseStartElement(); this->CloseStartElement();

View File

@ -62,6 +62,8 @@ public:
void CData(std::string const& data); void CData(std::string const& data);
void Doctype(const char* doctype);
void ProcessingInstruction(const char* target, const char* data); void ProcessingInstruction(const char* target, const char* data);
void FragmentFile(const char* fname); void FragmentFile(const char* fname);