Già letto e credo di aver trovato la soluzione modificando una procedura
presente in rete come segue in modo da poter impostare la property
"ProhibitDTD" funzionante. In pratica la property *deve* essere
impostata *prima* del caricamento del file .xml:
procedure ValidazioneFE2;
var
SchemaDoc, XmlDoc: IXMLDOMDocument2;
SchemaCache: IXMLDOMSchemaCollection;
Error: IXMLDOMParseError;
begin
//--------------- Load schema schema document ------------------------
// -------- Va impostato *prima* di caricare i dati --------------
SchemaDoc := CoDOMDocument60.Create;
SchemaDoc.async := False;
SchemaDoc.resolveExternals := True;
SchemaDoc.setProperty('ProhibitDTD', False);
SchemaDoc.load ( XmlFEXsdUrl );
//--------------- register schema cache- -----------------------
SchemaCache := CoXMLSchemaCache60.Create;
SchemaCache.add ( XmlFETargetNamespace, schemadoc);
//--------------- load data-- ----------------------
XmlDoc := CoDOMDocument60.Create;
XmlDoc.async := False;
XmlDoc.resolveExternals := True;
XmlDoc.load ( 'D:\FEdiProva.xml' );
//-------- allocate the schema cache to the XML document ----------
XmlDoc.schemas := schemacache;
//--------------- Verification and Report --------- ---------------
Error := xmldoc.validate;
if Error.errorCode <> S_OK then
ShowMessage(Error.reason)
else
ShowMessage( 'Verification succeeded ' );
end;
Così sembra funzionare, la sto testando.
Grazie.