Jonathan Sion
unread,Aug 28, 2008, 12:16:59 PM8/28/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi,
i have a basic XML file which i am trying to validate. i get the
error:
"An element or attribute information item has already been validated
from the '' namespace. It is an error if 'xsi:schemaLocation',
'xsi:noNamespaceSchemaLocation', or an inline schema occurs for that
namespace."
anybody knows why?? the code i am using is: (pretty basic, simply
setting options and reading the file)
thanks!
------------------------------------------------------------------------------------------
Dim oSettings As New XmlReaderSettings
oSettings.ValidationType = ValidationType.Schema
oSettings.ValidationFlags =
XmlSchemaValidationFlags.ProcessInlineSchema Or _
XmlSchemaValidationFlags.ReportValidationWarnings Or _
XmlSchemaValidationFlags.AllowXmlAttributes
Dim reader As XmlReader = XmlReader.Create(sFileName,
oSettings)
AddHandler oSettings.ValidationEventHandler, AddressOf
ValidationHandler
While Reader.Read()
' Reads the whole file and will call the validation
' handler subroutine if an error is detected. Doing
' it this way allows us to pick out ALL of the errors
' from the XML, rather than bombing out on the first
' one.
End While