What is an XML document declaration?

Internet 2021-09-05 19:33:09 1 2,118

According to XML, every document must start with an XML declaration. This includes information such as declaring the version of XML and the character set used.

XML declaration is a kind of processing instruction. The processing instruction is more complicated. The XML declaration is relatively simple. To put it vividly, its function is to tell the XML processing program: “The following document is to replace the data according to the standard of the XML document.”

The declaration format of an XML document is as follows:

Note that no other characters, even spaces, are allowed in front of the XML document, which means that the XML declaration must be the first content in the XML document.


Your opinion

Already have 1 Article answer
  • Chat 1楼
    you're actually a good webmaster. The website loading speed is amazing. It kind of feels that you're doing any distinctive trick. In addition, The contents are masterpiece. you have done a great activity in this topic!
    发布于 2021/10/27 07:56