Windows error 0x80131941, -2146231999

Detailed Error Information

COR_E_XmlSchema[1]

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode19 (0x013)
NameFACILITY_URT[2][3]
DescriptionThe source of the error code is .NET CLR.[2][3]
Error Code6465 (0x1941)

Questions

2votes
1answer

XML validate using XSDs with imports and includes in .net core

I want to validate XML documents against xsds with includes and imports, without includes and imports this code work. These are 4 xsds used to validate xml. Main.xsd <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:ord="http://NamespaceTest.com/OrderTypes" xmlns:pur="http://NamespaceTest.com/Purchase" xmlns:cmn="http://NamespaceTest.com/CommonTypes" xmlns:cust="http://NamespaceTest.com/CustomerTypes" targetNamespace="http://NamespaceTest.com/Purchase" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:import schemaLocation="CommonTypes.xsd" namespace="http://NamespaceTest.com/CommonTypes" /> <xs:import schemaLocation="CustomerTypes.xsd" namespace="http://NamespaceTest.com/CustomerTypes" /> <xs:import schemaLocation="OrderTypes.xsd" namespace="http://NamespaceTest.com/OrderTypes" [...] read more
.net
xml
xsd
2votes
1answer

XmlSchemaException C#

I have to read an XML from file, which is: <?xml version="1.0" encoding="UTF-16"?> <KyactusProfileClass xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <username>sadasdsad</username> <userid>0067AA87BF9AD466792E1A20F6AAB7F</userid> <useDefaultFolder>false</useDefaultFolder> <autoAcceptDownloads>false</autoAcceptDownloads> <visible>false</visible> </KyactusProfileClass> I read it using following code: using (var xmlReader = XmlReader.Create(pathXML)) { Console.WriteLine(File.ReadAllText(pathXML)); schemas.Add(null, xmlReader); } But I get following error: > System.Xml.Schema.XmlSchemaException: 'The root element of W3C [...] read more
c#
xml

Comments

Leave a comment

(plain text only)

Sources

  1. https://github.com/dotnet/coreclr/blob/v1.1.0/src/inc/corerror.xml
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx
  3. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0