26 Apr
2005
26 Apr
'05
9:23 p.m.
I have a dumb question. This is my first experience with libxml2 and lxml and I was wonder how to validate an xml file given a DTD either on the internet or in a catalog (whatever that is). I have read the api.txt file and it has a nice example on how to do this with a RelaxNG file but it does not show an example of how to validate against a DTD. Is it enough to have the declaration in the top of xml file and the parser will automatically validated it? If that is the case, I would think you would want to turn the validation off in certain cases. I briefly looked at the etree.c file but given that I've not done any wrapping of 'C' code, it's kind of hard to figure out the api. ...jeff