Last active
March 9, 2023 11:02
-
-
Save adojos/f91c0fade26be87d933d8fc34e7ce7ef to your computer and use it in GitHub Desktop.
VBS: Parse XML Errors on Loading #vbs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' This ParseError property is for errors and warnings during 'Load'method. | |
' Applies to IXMLDOMParseError interface. | |
Public Function ParseLoadErrors (ByVal ObjParseErr) | |
Dim strResult | |
strResult = vbCrLf & "<ERROR> INVALID XML! FAILED WELL-FORMED (STRUCTURE) CHECK ! " & _ | |
vbCrLf & ObjParseErr.reason & vbCr & _ | |
"Error Code: " & ObjParseErr.errorCode & ", Line: " & _ | |
ObjParseErr.Line & ", Character: " & _ | |
ObjParseErr.linepos & ", Source: " & _ | |
Chr(34) & ObjParseErr.srcText & _ | |
Chr(34) & " - " & vbCrLf & _ | |
vbCrLf & "CORRECT THE FILE BEFORE CONTINUING XSD VALIDATION !" & vbCrLf | |
ConsoleOutput "Log File : " & strLogPath, "verbose", LogHandle | |
ConsoleOutput "", "verbose", LogHandle | |
ConsoleOutput strResult, "verbose", LogHandle | |
ParseLoadErrors = False | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment