Re: [xml] adding DTD to document without parsing from file

On Sun, Dec 29, 2002 at 01:33:32PM -0600, Scott Peshak wrote:

i want to associate a DTD with a document I'm creating in memory (and
then dumping to disk) but all of the information i have found about this
use xmlParseDtd to get a xmlDtdPtr to associate with the document.  My
DTD does not exist as a external file it is hard coded in my app as a
const char[].  Is there a way to parse this so I can add it to my

  Make an xmlParserInputBufferPtr from your string and use
  xmlIOParseDTD(xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input,
                xmlCharEncoding enc);
You may have to dig a bit in the code to find the right entry points
and examples, but that should be doable


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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