What is the purpose of XSD files?

前端 未结 10 1526
抹茶落季
抹茶落季 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:24

    You mention C# in your question so it may help to think of as XSD as serving a similar role to a C# interface.

    It defines what the XML should 'look like' in a similar way that an interface defines what a class should implement.

提交回复
热议问题