XML Guide - XML ​​Confirmation

xiaoxiao2021-03-05  24

The syntax XML document is called a well-structured XML document.

The XML document verified by DTD is called a valid XML document.

"Structure" XML document

A good structure of XML documents should use the correct syntax.

A well-structured XML document should comply with XML syntax rules, and the example given in the previous chapter is a good structure XML document:

TOVE

jani

Reminder

don't doget me this weekend!

"Effective" XML document

A valid XML document should comply with DTD description.

An effective XML document is also a well-structured XML document, but also must comply with DTD rules.

TOVE

jani

Reminder

don't doget me this weekend!

XML DTD

DTD defines the legal elements available in the XML document.

The intent of DTD is to define the legitimate building module of the XML document. He determines the internal structure of the XML document by defining a series of legal elements. Good structure XML document is not necessarily an effective XML document, but the effective XML document must be a well-structured XML document. If you want to know more about DTD, you can refer to the DTD guide.

XML Schema

XML Schema (XML Mode) is an alternative to XML-based DTD.

W3C allows DTD and Schema to replace each other, and readers can learn more in the Schema Guide.

error

An error that occurs in the XML document will cause the XML program to stop.

W3C's XML specification statement: If the program finds an effective error in the processing XML document, then this program should be terminated. This is why XML software is easy to write relative to it. All XML documents should be coordinated.

In HTML, the HTML file may contain a lot of errors, (such as an element having a start tag without end tag) This is also a great reason why the HTML browser is very much. When they find errors, they have their own different ways. Decide how this HTML file should be displayed.

This will not happen in XML.

转载请注明原文地址:https://www.9cbs.com/read-36907.html

New Post(0)