473,419 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

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

Hi frnds,

i have simple XML doc

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

and test.xsl

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/data">
<xsl:text> My name is : <xsl:text>
<xsl:value-of select="data/name" />
</xsl:template>
</xsl:stylesheet>


this works fine with IE...but when i trying to run it with mozilla firefox ...it 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

Divyesh
Jul 31 '07 #1
3 18961
drhowarddrfine
7,435 Expert 4TB
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
hi,

I have two blank lines at the start

something like

1.
2.
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
jkmyoung
2,057 Expert 2GB
Yes, you must remove these 2 lines for it to be valid xml.
Aug 1 '07 #4

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

Similar topics

3
by: Mike Kennedy | last post by:
I have an XML Snippet <?xml version="1.0" encoding="UTF-8"?> and when I convert the entire xml file to a DOM and then generate a new file from the DOM, results in <?xml version="1.0"?>. Any...
4
by: peter | last post by:
When I transform a dataset to a xml file by applying a xslt file, why by default, a "encoding="utf-8" ?" is added to the output file?How to get rid of it? Thanks
2
by: FrzzMan | last post by:
The first time I called this function, everything went well, but the second time I called it. An Exception thrown, do you know why? An unhandled exception of type 'System.IO.IOException' occurred...
4
by: LP | last post by:
Hi, My webservice is currently deployed on WIndows 2000 server and runs pretty fine. I am trying to run my webservice on a Windows 2003 server. My webservice tries to write to a eventlog. The...
1
by: Daniel | last post by:
how to parse <?xml version="1.0" encoding="UTF-8"?> with xpath? is it possible?
1
by: BillAtWork | last post by:
Hi, I'm trying to validate an XML document against an XSD schema and I receive the following error: ---------- MyCode.CreateValidRequest : System.Web.Services.Protocols.SoapException :...
6
by: eric.goforth | last post by:
Hello, I'm calling a VB.NET 2003 dll that's registered in COM+. I've added a reference to it in a VB6 DLL that I'm calling from a Classic ASP page. Previously I was able to attach to my .NET...
2
by: dazedandconfused | last post by:
Building a site for a client, loaded it up, it works fine in Firefox but presents the below message when loading into ie 6 or ie 5, fine in 7 I think, but the client can not even view it in 7. So...
8
by: autumnrrr | last post by:
This is coming up Invalid PI name <?XML version="1.0" encoding="UTF-8"?> XML declaration allowed only at the start of the document <?xml version="1.0" encoding="UTF-8"?>
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.