Salve,
valido la fattura elettronica con questo codice:
//--------------- Load schema schema document ------------------------
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.loadXML(AXmlText);
//------ allocate the schema cache to the XML document ------------
XmlDoc.schemas := schemacache;
//--------------- Verification and Report -------------------------
Error := xmldoc.validate;
if Error.errorCode <> S_OK then
begin
Beep;
ShowMessage(smMsg + IntToStr(Error.line) + ': ' +
Error.Reason +
Error.SrcText);
end
else Result := true;
ma dal 01/09/2022 non funziona più perché restituisce sempre l’eccezione:
Durante il caricamento dello schema “http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd” si è verificato il seguente errore: Accesso negato. Errore durante l’elaborazione della risorsa “http://www.w3.org/2001/XMLSchema.dtd”
Non capisco cosa sia cambiato e come posso rimediare.
Se può essere di aiuto, il mio file xml inizia sempre così:
<?xml version="1.0" encoding="WINDOWS-1252"?>
<p:FatturaElettronica xmlns:p="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2" versione="FPR12">
Qualcuno può aiutarmi?
Non capisco: perché il messaggio viene interpretato come spam e mi viene nascosto?
Grazie.