xml schema validation error “prefix is not bound”

后端 未结 3 536
醉话见心
醉话见心 2021-02-07 01:57

I am entirely new to XML Schema and am trying to get the basics down. Here is my xml schema code (filename: example1.xsd):




        
3条回答
  •  北荒
    北荒 (楼主)
    2021-02-07 02:27

    When you get an error like this, the simplest way is to add the prefix declaration; in your case, as per schema, just add to your root element the following attribute:

    xmlns:sample="http://www.example.com"
    

    Also, this is rather related with XML namespaces.

提交回复
热议问题