[xml] XML validation
- From: Francesco Gennai <francesco gennai isti cnr it>
- To: xml gnome org
- Subject: [xml] XML validation
- Date: Fri, 19 Dec 2008 18:47:34 +0100
Scenario:
I need to validate an XML file received via e-mail.
It has no <!DOCTYPE element.
The DTD file is stored locally (on the receiving system).
Reading some thread on this list and the documentation I have understood that
the best validation can be obtained if the DTD file is referenced by the
XML file.
Since the XML file is a short file, my idea is to add the line
<!DOCTYPE eulotnw SYSTEM "/dtd/xxxx.dtd">
to the file, before to pass it to
xmlCtxtReadFile(pctxt, xmlfilename, NULL, XML_PARSE_DTDVALID);
Is this a good idea to get the best validation of the XML file ?
Any other suggestion?
Thanks.
Francesco.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]