By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,198 Members | 1,721 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,198 IT Pros & Developers. It's quick & easy.

<?xml version="1.0" encoding="utf-8"?> creting problem with mozilla firefox

P: 2
Hi frnds,

i have simple XML doc

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<name> Divyesh Jariala</name>

and test.xsl

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:template match="/data">
<xsl:text> My name is : <xsl:text>
<xsl:value-of select="data/name" />

this works fine with IE...but when i trying to run it with mozilla firefox gives me an error

XML Parsing Error: xml declaration not at start of external entity
Line Number 3, Column 1:<?xml version="1.0" encoding="UTF-8"?>

what might be the problem?

Thanx in advance

Jul 31 '07 #1
Share this Question
Share on Google+
3 Replies

Expert 5K+
P: 7,435
xml declaration not at start of external entity
Line Number 3
Isn't that the problem? Are you sure you have no other characters before the declaration? It must be on line one.
Jul 31 '07 #2

P: 2

I have two blank lines at the start

something like

3. <?xml version="1.0" encoding="utf-8"?>

actually, this XML is generating from my jsp files, so it contains two blank lines.,
one for page directive and another for include directive

n i don't know why its taking this two blank lines

So, is this the problem?
Aug 1 '07 #3

Expert 100+
P: 2,057
Yes, you must remove these 2 lines for it to be valid xml.
Aug 1 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.