[xml] followup on inserting dtd



Okay, I managed to find the thread:

http://mail.gnome.org/archives/xml/2002-January/msg00226.html

The search facility is rather useless..manually skimming the subjects was
the key.  However, the final entry of that thread is exactly the state
that I am in also.  Doing it the way Daniel suggests as:

  doc = xmlNewDoc("1.0");
  dtd = (xmlDtdPtr) xmlParseDTD("netlogon",
"/home/deryk/netlogon/netlogon.dtd");

  /* here to ... are Daniels suggested methods */
  doc->intSubset = dtd;

  if(doc->children == NULL)
    xmlAddChild((xmlNodePtr)doc, (xmlNodePtr)dtd);
  else
    xmlAddPrevSibling(doc->children, (xmlNodePtr)dtd);
  ...
  xmlDocDump(stderr, doc);

Still does not insert the external doctype reference into the document as
one would expect.  The document itself is generated fine no problems.

Given the nature of the library and the document formats in general one
would presume that it would indeed be as simple as adding another node to
the list as all the snippets I've seen would suggest. :)





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