No matching global declaration available for the validation root

前端 未结 3 1343
春和景丽
春和景丽 2020-12-25 09:44

Background

Validate an XML document using a schema.

Problem

The simplest form of the problem is shown in two files.

XML Document

<
3条回答
  •  醉梦人生
    2020-12-25 10:11

    In my practice, I got the No matching global declaration available for the validation root in two cases:

    • If XSD does not contain an explained in @aravind-r-yarram's answer.
    • If in XML does not contain an xmlns attribute. In such case adding the xmlns will help:

      
          ...
      
      

提交回复
热议问题