Re: [xml] program interaction with XML config

On Mon, Nov 27, 2006 at 08:22:03PM -0500, Brent Baccala wrote:
  Design issues not really specific to libxml2
Can I hardwire the DTD into the program?  I don't see anything in the
API that lets me load a DTD from a char[] buffer - did I miss this?

 * xmlIOParseDTD:
 * @sax:  the SAX handler block or NULL
 * @input:  an Input Buffer
 * @enc:  the charset encoding if known
 * Load and parse a DTD
 * Returns the resulting xmlDtdPtr or NULL in case of error.
 * @input will be freed by the function in any case.

xmlIOParseDTD(xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input,
              xmlCharEncoding enc) {

  You will have to create an xmlParserInputBufferPtr from a in-memory string
but that's possible.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
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]