Re: Parsing error when XML version is mentioned
| From: | Scrumpy | Date: | Sun, 25 Jul 2004 21:29:37 +0000 |
| Subject: | Re: Parsing error when XML version is mentioned | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-191841@lists.php.net to get a copy of this message | ||
suresh_gen@hotmail.com (Suresh Manoharan) wrote in
news:20040725200455.96539.qmail@pb1.pair.com:
> I am getting parse error [Parse error: parse error, unexpected
> T_STRING on line 1] when I use XML version info.
>
><?xml version="1.0" encoding="utf-8"?>
><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
><html xmlns="http://www.w3.org/1999/xhtml"
>xml:lang="en-US"
>lang="en-US"> <head>
[snip]
> Can you pls. help me understand why parsing error occurs and how to
> avoid it.
I just start with "<!DOCTYPE..." on the first line and exclude the
"<?xml..." line completely and both parsing and validation are fine.