RE: [xml] Generating XML including <!DOCTYPE> external reference

Date view Thread view Subject view Author view

From: Kenneth Pronovici (pronovic@skyjammer.com)
Date: Tue Sep 26 2000 - 14:50:38 EDT


I've received a number of private requests for information on how
I finally resolved this DOCTYPE issue (recall, I wanted to include
a reference to an external DOCTYPE in my XML document). Since people
seem to need this information and don't seem to be able to find it for
whatever reason, I think it's worth having my standard reply in the
mailing list archives:

> Here's an example of how I got it to work:
>
> /* Here's the document */
> doc = xmlNewDoc((xmlChar *)"1.0");
>
> /* Set dtd */
> xmlCreateIntSubset(doc, (xmlChar *)"fds_cooked_oms", NULL,
> (xmlChar *)"fds_cooked_oms.dtd");
>
> /* Here's the fds_cooked_oms node */
> doc->children->next = xmlNewDocNode(doc, NULL, (xmlChar*)"fds_cooked_oms",
> NULL);
>
> I believe that means that the <!DOCTYPE> tag ends up being the first
> child of the document.

KEN

--
Kenneth J. Pronovici <pronovic@ieee.org>
Alliance of Computer Professionals (http://www.acpros.com/)
Personal Homepage: http://www.skyjammer.com/~pronovic/
"Hell hath no fury like the weather when I'm camping..."

---- Message from the list xml@rpmfind.net Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Sep 26 2000 - 15:43:23 EDT