U8XmlParser
U8XmlParser copied to clipboard
Feature Request: Xml Validation
It would be great to have XmlValidation as part of this library using XmlSchemaSet
.
Currently (using XDocument):
var schemas = new XmlSchemaSet();
schemas.Add("<namespace>", XmlReader.Create("<XsdLocation>"));
var xml = "<test></test>";
var doc = XDocument.Parse(xml);
doc.Validate(_schemas, ValidationCallBack);
private void ValidationCallBack(object? sender, ValidationEventArgs e)
{
...
}
System.Xml.Schema.Extensions.Validate
I'm not sure how the api would look, but I would prefer a returned object from Validate
instead of a callback
Hi @simon-curtis
That's a good request, but unfortunately, I do not have the motivation to add new features. I am not familiar with XSD: XML Schema Definition Language, and it would take a lot of work to create that validation.
I have no plans to implement it at this time.
Thanks for using my library.