如何在特定行抑制XML模式验证警告

时间:2014-09-02 18:01:33

标签: xml visual-studio-2012 xsd xml-validation suppress-warnings

我正在使用Visual Studio 2012。 我故意准备了一些具有特定错误的XML文件,以便对我的XML Schema进行单元测试。我想只压制我准备的警告。警告的示例如下:

Warning 3   'ProductRef' is already used as an ID.  <some_path>\'ProductRef' should be unique.nbs.xml
Warning 2   The 'ProductRef' element is invalid - The value '' is invalid according to its datatype 'String' - The actual length is less than the MinLength value.  <some_path>\'ProductRef' should not be empty.nbs.xml
Warning 1   The value of the 'version' attribute does not equal its fixed value.    <some_path>\root@'version' should be 1.0.nbs.xml

以下链接没有帮助:

0 个答案:

没有答案
相关问题