I have an XSD schema and the root document is:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:camt.054.001.02" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:camt.054.001.02">
</xs:schema>
I load the schema into as schemaset as follows:
var schemas = new XmlSchemaSet();
using (var reader = new XmlTextReader(new StringReader(content)))
{
schemas.Add(null, reader);
}
However, I get the following exception:
The root element of a W3C XML Schema should be and its namespace should be 'http://www.w3.org/2001/XMLSchema'.
What am I missing?