Re: [xml] Building DOM: Adding the DOCTYPE

On Mon, 2002-11-18 at 22:46, Daniel Veillard wrote:
On Mon, Nov 18, 2002 at 07:22:41PM +0100, Murray Cumming wrote:
When using the libxml DOM interface to build an XML document, how can I
add the DOCTYPE declaration at the top? For instance
<!DOCTYPE example_xml_doc SYSTEM "example_xml_doc.dtd">

xmlCreateIntSubset(xmlDocPtr doc, const xmlChar *name,
                   const xmlChar *ExternalID, const xmlChar *SystemID);

  xmlCreateIntSubset(doc, "example_xml_doc", NULL, "example_xml_doc.dtd");

 should do what you want.

Thanks. That works.

Murray Cumming
murray usa net

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]