Re: [xml] Building DOM: Adding the DOCTYPE
- From: murrayc t-online de (Murray Cumming)
- To: veillard redhat com
- Cc: libxml-list <xml gnome org>
- Subject: Re: [xml] Building DOM: Adding the DOCTYPE
- Date: 19 Nov 2002 02:18:50 +0100
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">
use
xmlDtdPtr
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
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]