It looks like you're new here. Sign in or register to get started.
CREATE(xmlDoc); CREATE(xmlSchemaCache); xmlSchemaCache.add('http://www.foo.ch/xmlns/f001/1', 'C:\temp\theSchema.xsd'); xmlDoc.schemas := xmlSchemaCache; xmlDoc.async := FALSE; xmlDoc.load('c:\temp\theXML.xml'); xmlParseError := xmlDoc.parseError; IF xmlParseError.errorCode <> 0 THEN BEGIN ERROR... { using xmlParseError.errorCode, xmlParseError.reason, xmlParseError.line, xmlParseError.linepos, xmlParseError.filepos } END;
ta5 wrote: You can use DOM to validate it, needs at least xml4.0. CREATE(xmlDoc); CREATE(xmlSchemaCache); xmlSchemaCache.add('http://www.foo.ch/xmlns/f001/1', 'C:\temp\theSchema.xsd'); xmlDoc.schemas := xmlSchemaCache; xmlDoc.async := FALSE; xmlDoc.load('c:\temp\theXML.xml'); xmlParseError := xmlDoc.parseError; IF xmlParseError.errorCode <> 0 THEN BEGIN ERROR... { using xmlParseError.errorCode, xmlParseError.reason, xmlParseError.line, xmlParseError.linepos, xmlParseError.filepos } END; Hope this helps Thomas
Answers
Hope this helps
Thomas
Sweet, it worked. Thanks a lot!