Action.IsValid MethodAction.IsValid MethodEDKB12WS.Action.IsValid MethodIsValid Methodtopic_000000000000000AEDKB12WS.Action.IsValidEDKB12WS.Action.IsValidAction.IsValidEDKB12WS.Action.Action.IsValidEDKB12WS.Action.IsValidEDKB12WS (in EDKB12WS.exe)Action.IsValidMethodEDKB12WS.Actiontopic_000000000000000AAction.IsValid Method
Überprüft ob das Xml file dem angegebenen Schema entspricht
Assembly:
EDKB12WS (in EDKB12WS.exe)
Visual Basic
Private Function IsValid( _ ByVal xmlImportFile As ]]>FileInfoa]]>]]> _ ) As ]]>Booleana]]>]]>
private function IsValid( xmlImportFile : ]]>FileInfoa]]>]]> ) : ]]>booleana]]>]]>;
ParametersxmlImportFile
$END-IFNOTEMPTY$
Visual Basic
Copy Code
]]>
Private Function IsValid(ByVal xmlImportFile As FileInfo) As Boolean Dim reader As New XmlTextReader(xmlImportFile.FullName) 'We pass the xmltextreader into the xmlvalidatingreader 'This will validate the xml doc with the schema file 'NOTE the xml file it self points to the schema file
Dim validator As New XmlValidatingReader(reader) Try 'First we create the xmltextreader
' Set the validation event handler 'AddHandler validator.ValidationEventHandler, _ 'AddressOf ValidationCallback _validationSuccess = True 'make sure to reset the success var
' Read XML data While (validator.Read) End While 'Close the reader. validator.Close()
reader.Close()
'The validationeventhandler is the only thing that would 'set m_Success to false Return _validationSuccess Catch ex As Exception validator.Close() reader.Close()
_validationSuccess = False _validationSuccess = False Return _validationSuccess Throw ex End Try End Function
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2The .NET Framework does not support all versions of every platform. For a list of the supported versions, see
]]>System Requirementsa]]>]]>.