What is the purpose of XSD files?

前端 未结 10 1505
抹茶落季
抹茶落季 2020-11-30 20:25

Since we can query on the XML file from C# (.NET), why do we need an XSD file? I know it is metadata file of particular XML file. We can specify the relationships in XSD, b

10条回答
  •  南方客
    南方客 (楼主)
    2020-11-30 21:04

    Without XML Schema (XSD file) an XML file is a relatively free set of elements and attributes. The XSD file defines which elements and attributes are permitted and in which order.

    In general XML is a metalanguage. XSD files define specific languages within that metalanguage. For example, if your XSD file contains the definition of XHTML 1.0, then your XML file is required to fit XHTML 1.0 rather than some other format.

提交回复
热议问题