XML Schema: root element

前端 未结 6 1220
难免孤独
难免孤独 2020-12-03 04:11

The following post asks how to indicate that an element is the root element in an XML schema:

Is it possible to define a root element in an XML Document using Schema

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-03 04:36

    The disadvantage of lots of global elements is they could all be used as root elements for documents. The advantage is then you can use the element when defining new types which will assure the namespace of the child elements match those of the parent type.

    I have changed from thinking there should only be one global element to that all complex types should have a global element.

提交回复
热议问题