ValidateXmlAgainstXsd

Methode (Function) · gibt Boolean zurück

ValidateXmlAgainstXsd ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK.

Beschreibung (aus der SDK-Dokumentation): Validates an XML file against an XSD schema. The messages can be read with GetXSDValidationErrors.

Rückgabe: True if no validation message was reported; False if validation errors occurred or an exception was raised (e.g. file not found or invalid schema).

Deklaration

Public Function ValidateXmlAgainstXsd(ByVal xmlPath As String, ByVal xsdPath As String, Optional ByVal schemaNamespace As String = Nothing) As Boolean

Parameter

NameTypPflichtBeschreibung
xmlPathStringerforderlichPath of the XML file
xsdPathStringerforderlichPath of the XSD schema file
schemaNamespaceStringoptional (Standard: Nothing)Target namespace of the schema; if empty the namespace from the XSD is used

Aufruf (VB.NET)

Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, LicenseKey)
' …
Dim ergebnis = alo.ValidateXmlAgainstXsd(xmlPath, xsdPath)

COM-Schnittstelle

ValidateXmlAgainstXsd ist Mitglied der Schnittstelle Aloaha_ZUGFeRD.iXML (Position 321 von 328) und damit auch aus VB6, VBA/Access und anderen COM-Clients über CreateObject("Aloaha_ZUGFeRD.XML") aufrufbar. Neue Mitglieder werden immer am Ende von iXML angefügt, damit bestehende COM-Clients unverändert weiterlaufen; nach einem Update die Typbibliothek neu registrieren.

Quelle: XML-Dokumentationskommentare des Aloaha ZUGFeRD SDK (xml.vb). Gleiche Signatur in VB6/VBA über COM; in C# mit Semikolon.