libxml, how to validate against a given dtd?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adib Taraben

    libxml, how to validate against a given dtd?

    Hi,

    I use libxml in C/C++.
    I have an xml-file that has a dtd-definition.
    and I have an other dtd that has not the same name as in the xml-file.

    How can I validate that xml-file against my local dtd file?

    I played around with xmllint but it seems to not work.?
    Is there any example for "xmlValidateDtd Final" function which I think
    goes into that direction?
    Any hints?

    Many thanks,

    Adib.
  • Patrick TJ McPhee

    #2
    Re: libxml, how to validate against a given dtd?

    In article <2h9stfFaepkpU1 @uni-berlin.de>,
    Adib Taraben <theAdib@yahoo. com> wrote:

    [...]

    % How can I validate that xml-file against my local dtd file?

    % I played around with xmllint but it seems to not work.?

    What did you try?

    xmllint -dtdvalid local.dtd file.xml

    ought to do what you want.

    % Is there any example for "xmlValidateDtd Final" function which I think
    % goes into that direction?

    Look at the handling of dtdvalid in the xmllint.c.


    --

    Patrick TJ McPhee
    East York Canada
    ptjm@interlog.c om

    Comment

    Working...