Re: [xml] correct way to output HTML without the <?xml...

<John Hockaday ga gov au> writes:


An XML document instance must have an xml declaration otherwise it is not
valid XML.  

This is not true, John.

An XML 1.1 document MUST have an XML decl. Here is the relevant para

  2.8 Prolog and Document Type Declaration

  [Definition: XML 1.1 documents MUST begin with an XML declaration
  which specifies the version of XML being used.] For example, the
  following is a complete XML 1.1 document, well-formed but not valid:

  <?xml version="1.1"?>
  <greeting>Hello, world!</greeting> 

  but the following is an XML 1.0 document because it does not have an
  XML declaration:

  <greeting>Hello, world!</greeting>

Nic Ferrier

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]