0
Schematron.net nuget 패키지를 사용하고 있으며 결과를 구조화 된 형식으로 처리 할 수 있도록 Validate 호출 결과를 얻을 수 있는지 알고 싶습니다. 내 기존 솔루션은 try catch 블록을 사용하며 어설 션 오류는 모두 오류 메시지로 예외 내에서 메시지로 반환됩니다. 이 정보를 XML로 가져 오는 방법이 있습니까? 나는 비슷한 질문을하는 post을 보았지만 그 대답은 Schematron.net 구현을 언급하지 않는다.Schematron.net 구조화 된 오류보고
내 코드는 다음과 같습니다
는try
{
var bookValidator = new Validator();
bookValidator.AddSchema("book.xsd");
bookValidator.Validate("book.xml");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}