[Mono-dev] Validate xml file with schema file

Chakotey STME chakoteystme at gmail.com
Mon Nov 29 04:55:34 EST 2010


Hi,

I have a problem with this code under mono 2.6:

        Dim xsdMarkup As XDocument =
XDocument.Load("/home/stefan/xml/PluginConfigSchema.xsd")


        Dim schemas As XmlSchemaSet = New XmlSchemaSet()
        schemas.Add("", xsdMarkup.CreateReader)

        Dim doc1 As XDocument = XDocument.Load("/home/stefan/xml/Total
Processes.xml")

        doc1.Validate(schemas, AddressOf XSDErrors)


    Private Sub XSDErrors(ByVal o As Object, ByVal e As ValidationEventArgs)
        Console.WriteLine("{0}", e.Message)
        errors = True
    End Sub

If I execute this program I get the following Exception:
Unhandled Exception: System.NotImplementedException: The requested
feature is not implemented.
  at XMLReader4.Module1.Main () [0x00000] in <filename unknown>:0

But the mono migration analyzer says that this code is ok.

So what can I do that this code works under mono 2.6?

Thanks

chakoteystme


More information about the Mono-devel-list mailing list