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.
 */

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

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

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



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