Hi everybody,
I wrote a routine in Delphi, to validate a XML against its XSD, using MSXML 6 tools. The problem is that the validation messages are in english, but I need the messages in portuguese. It is possible? Follows the routine:
function TForm1.ValidXML2(const xmlFile: String; out err: IXMLDOMParseError): Boolean; var xml, xml2, xsd: IXMLDOMDocument2; schemas, cache: IXMLDOMSchemaCollection; begin xml := CoDOMDocument.Create; if xml.load(xmlFile) then begin schemas := xml.namespaces; if schemas.length > 0 then begin xsd := CoDOMDocument40.Create; xsd.Async := False; xsd.load(schemas.namespaceURI[0]); cache := CoXMLSchemaCache40.Create; cache.add(schemas.namespaceURI[1], xsd); xml2 := CoDOMDocument40.Create; xml2.async := False; xml2.schemas := cache; Result := xml2.load(xmlFile); if not Result then err := xml2.parseError else err := nil; end; end; end;