The element “x” in namespace “xSchema” has invalid child element “y” in namespace “xSchema”. List of possible elements expected: “y”

前端 未结 2 1700
孤街浪徒
孤街浪徒 2021-02-20 03:17

I am writing a schema for my XML validation final, and finally got everything (just about) working. But now I\'m getting the strangest error in my XML. I\'ll start by showing my

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-20 03:28

    The element 'orders' in namespace 'OrdersSchema' 
    has invalid child element 'order' in namespace 'OrdersSchema'. 
    List of possible elements expected: 'order'. 
    

    In other words, it thinks your schema told the parser to expect a non-namespaced child element, and you provided a namespaced in the instance document.

    http://www.w3.org/TR/xmlschema-0/#NS

提交回复
热议问题