Re: [xml] libxml 2.2 validate



On Fri, Jul 26, 2013 at 10:22:17AM +0300, Afanasiy Fet wrote:
How to validate xml against .dtd, but not include the
<!DOCTYPE Document SYSTEM "validate.dtd">
with
xmlCreateIntSubset(doc, BAD_CAST "Document", NULL, BAD_CAST "validate.dtd");
into xml file. Best choice would be to use "xmlValidateDocument(context,
document)" alternative (if such exist?) with third parameter to provide dtd
filename or its string.

  use xmlValidateDtd()

there is an example in xmllint.c when using dtdvalid see around line
2743 and following.

Daniel

-- 
Daniel Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/


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