While reading I observed contradictory statements abt XML declaration <?xml version='1.0'?>: 1)the XML declaration "should always be included" and 2)"while it is not required". Is the omission an error? Why should it be included? XML processors do not give any error without it, i.e. does not require it at all. Can you give me example when and for what it is so essential?
The official rule, I believe, is: The XML declaration is optional, but highly recommended. If an XML document includes the XML declaration, it must be the very first line of the xml document, no comments, spaces, PIs, or anything before it. The <?xml ...?> declaration is special in that it can only include the three attibutes, version, encoding and standalone, in THAT order. And version is mandatory, and must be set to "1.0". No other values for version are permitted. Hope that helps... Scott Duffy MCSD, SCJP, and taking IBM XML tomorrow
posted 17 years ago
Dan and Scott, thanks a lot
I can't take it! You are too smart for me! Here is the tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop