Action.IsValid Method Action.IsValid Method EDKB12WS.Action.IsValid Method IsValid Method topic_000000000000000A EDKB12WS.Action.IsValid EDKB12WS.Action.IsValid Action.IsValid EDKB12WS.Action.Action.IsValid EDKB12WS.Action.IsValid EDKB12WS (in EDKB12WS.exe) Action.IsValid Method EDKB12WS.Action topic_000000000000000A
Action.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]]>]]>
C#
private ]]>boola]]>]]> IsValid(
  ]]>FileInfoa]]>]]> xmlImportFile
)
C++
private:
]]>boola]]>]]> IsValid(
  ]]>FileInfoa]]>]]>^ xmlImportFile
)
JScript
private function IsValid(
   xmlImportFile : ]]>FileInfoa]]>]]>
) : ]]>booleana]]>]]>;
ParametersxmlImportFile
$END-IFNOTEMPTY$
Visual Basic Copy CodeCopy 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 SP2 The .NET Framework does not support all versions of every platform. For a list of the supported versions, see ]]>System Requirementsa]]>]]>.
.NET Framework Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0
.NET Compact Framework Supported in: 3.5, 2.0, 1.0
XNA Framework Supported in: 3.0, 2.0, 1.0
Reference Action ClassAction Class
Action Action MembersAction Action Members