What is the difference between XML and XSD?

后端 未结 7 981
南笙
南笙 2020-11-27 11:31

What is the difference between Extensible Markup Language (XML) and XML Schema (XSD)?

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-27 12:09

    XML has a much wider application than f.ex. HTML. It doesn't have an intrinsic, or default "application". So, while you might not really care that web pages are also governed by what's allowed, from the author's side, you'll probably want to precisely define what an XML document may and may not contain.

    It's like designing a database.

    The thing about XML technologies is that they are textual in nature. With XSD, it means you have a data structure definition framework that can be "plugged in" to text processing tools like PHP. So not only can you manipulate the data itself, but also very easily change and document the structure, and even auto-generate front-ends.

    Viewed like this, XSD is the "glue" or "middleware" between data (XML) and data-processing tools.

提交回复
热议问题