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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×