[xml] Validation Problem


I'm having problems validating my XML file and I wondered someone could
help.  I took some code from the mailing list;

xmlDoValidityCheckingDefaultValue = 1;

//parse the document
doc = xmlParseFile(filename);   
xmlValidCtxt cvp;       
cvp.userData = (void *) stderr;
cvp.error = (xmlValidityErrorFunc) fprintf;
cvp.warning = (xmlValidityWarningFunc) fprintf;
//validate the document
valid = xmlValidateDocument(&cvp, doc);

This gives the error;

xmltarget.obj : error LNK2001: unresolved external symbol
Debug/ParseXMLTarget.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

ParseXMLTarget.exe - 2 error(s), 0 warning(s)

If I remove the "=1" from;

xmlDoValidityCheckingDefaultValue = 1;

The code compiles ok but the value of "valid" is always 1 (regardless of how
many errors there are in the xml file). As a check, I validated the file
with MSXML and it failed (as I expected).  

I'm not able to subscribe to the mailing list so I'd be most grateful if you
could send any ideas to my email address as  well.

Many thanks,
Paul Chambers.

The Information contained in this E-Mail and any subsequent correspondence
is private and is intended solely for the intended recipient(s).
For those other than the recipient any disclosure, copying, distribution,
or any action taken or omitted to be taken in reliance on such information
is prohibited and may be unlawful.

Emails and other electronic communication with QinetiQ may be monitored.
Calls to our Customer Contact Centre may be recorded for quality control,
regulatory and monitoring purposes.

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