A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
XML and Related Technologies
why is there a "?" in the beginning of an xml document
Joined: Sep 28, 2009
May 11, 2011 18:16:33
Was just wondering.. is there any logical reason for the "?" at the beginning of an xml document?
<?xml version="1.0 encoding="some_encoding">
Author and all-around good cowpoke
Joined: Mar 22, 2000
May 12, 2011 08:38:24
That is the format required by the standard. One function is to tell the parser that the < does not start a normal tag.
See also the use of special characters in the format for comments and DOCTYPE declarations.
Joined: Jan 18, 2011
May 12, 2011 10:58:14
Read carefully: <? opening tag, ?> closing tag. The simple line contains already two mistakes (another is version, a genuine typo, possibly).
I agree. Here's the link:
subject: why is there a "?" in the beginning of an xml document
Content is not allowed in prolog
Removing XML declaration in XML file
Parsing an Xml file with No xml Declaration
Tomcat stopped working again!
Unicode characters - javax . xml . transform . Transformer
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014