Re: [xml] help with embedded DTD

Date view Thread view Subject view Author view

From: Fred_Smith@computrition.com
Date: Tue Jan 23 2001 - 16:43:27 EST


Thanks! My comments are below, indented, since this silly mailer doesn't
quote things like any decent mailer should....

Daniel Veillard <Daniel.Veillard@imag.fr> on 01/23/2001 01:57:37 PM

Please respond to xml@rpmfind.net

To: xml@rpmfind.net
cc: (bcc: Fred Smith/Computrition)
Subject: Re: [xml] help with embedded DTD

On Tue, Jan 23, 2001 at 01:16:21PM -0500, Fred_Smith@computrition.com
wrote:
[snip]

> doc = xmlNewDoc("1.0");
> dtd = xmlParseDTD (NULL, "CI7.dtd");
the xmlDtdPtr structure is defined in tree.h
add the following there:
       if (dtd->ExternalID != NULL) {
           xmlFree((xmlChar *) dtd->ExternalID);
        dtd->ExternalID = NULL;
       }
       if (dtd->SystemID != NULL) {
           xmlFree((xmlChar *) dtd->SystemID);
        dtd->SystemID = NULL;
       }

        Yes, this almost works, thanks! If I use xmlFree() as shown I get a
        segmentation violation. If I replace that with a call to free() I
        don't. Weird. I'll look into it a little to see if I can see what's
        going on. But using free() (or skipping the free entirely) gives me
        the desired output.
you should also test that xmlNewDoc and xmlParseDTD didn't
returned NULL,

        Yes, thanks... that is just a quickie testbed so it's lacking in
        robustness,
        but thanks for the reminder.

----
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 Jan 23 2001 - 18:43:40 EST