Jump to content
bepsmi

Two questions about xml

Recommended Posts

I have the following questions I can't answer by myself: What is the version of XML one should use? 1.0 or 1.1? Wierdly, 1.0 seems to be more updated and more used than 1.1... how is this possible? Is the prolog <?xml version="1.0"> necessary in an XML document? If not, is there a default version (1.0 or whatever) that the processor assumes when the prolog is not present?

Share this post


Link to post
Share on other sites

There's no such thing as XML 1.1. There's XHTML 1.1 which isn't really used much anymore. The XML declration is required in an XML document. It can also include the character set that the document uses. It need both an opening <? and closing ?> <?xml version="1.0" encoding="UTF-8" ?>

Share this post


Link to post
Share on other sites

The default is the highest supported by the XML parser.The main difference between 1.0 and 1.1 is in what's allowed as tag names - XML 1.0 only allowes a certain (very large!!!) range of printable characters, while XML 1.1 only forbids a certain (very small) range of characters that are either already special (e.g. "<" and ">") or are reserved for potential future expansions (e.g. "{" and "}").There's almost no other difference, which is why you don't see many users use it, and in turn, fewer parsers for it.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...