A name was started with an invalid character
first line of the code below cause some error "A name was started with an invalid character".............what is the error??
Code:
<% Response.ContentType = "application/xml" %>
<?xml version="1.0" encoding="UTF-8"?>
<?xml:stylesheet type = "text/xsl" href ="NBAGuideTransform.xsl"?>
<TVSchedule>
<TVGuide>
<%
Dim adoConnect
Dim adoRecordset
Set adoConnect = Server.CreateObject("ADODB.Connection")
adoConnect.open = "Provider=Microsoft.Jet.OLEDB.4.0;" & "DataSource=C:\NBATVGuide.mdb"
Set adoRecordset = adoConnect.Execute("Select ProgramTitle, ProStartTime from tblNBASchedule order by ProStartTime")
Do While Not adoRecordset.EOF
Response.Write "<ProgramTime>" + adoRecordset("ProStartTime") + "</ProgramTime>"
Response.Write "<ProgramTitle>" + adoRecordset("ProgramTitle") + "</ProgramTitle>"
adoRecordset.MoveNext
Loop
adoRecordset.Close
set adoRecordset = Nothing
%>
</TVGuide>
</TVschedule>
Re: A name was started with an invalid character
Do you mean this line?
<% Response.ContentType = "application/xml" %>
Re: A name was started with an invalid character
yes!! what is the mistake?
Re: A name was started with an invalid character
There is no mistake. If you are using Notepad to edit the file, make sutre that you save it in ANSI and not Unicode.
Re: A name was started with an invalid character
ya...i'm save in ANSI.....but still cannot...
Re: A name was started with an invalid character
"A name was started with an invalid character"
this line error is it mean i'm using some invalid character?
Re: A name was started with an invalid character
What is giving you the error? ASP or the XML viewer you are using. I think you may have to remove all white space before the first tag, like this:
Code:
<% Response.ContentType = "application/xml" %><?xml version="1.0" encoding="UTF-8"?>
<?xml:stylesheet type = "text/xsl" href ="NBAGuideTransform.xsl"?>
<TVSchedule>
<TVGuide>
Re: A name was started with an invalid character
i'm using Internet Explorer to view.............i remove the white space but still have the same error!
Re: A name was started with an invalid character
error message:
Code:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A name was started with an invalid character. Error processing resource 'http://localhost/ASP_Sample.aspx'. Line 1, Positi...
<% Response.ContentType = "application/xml" %>
-^
Re: A name was started with an invalid character
Well you have ASP code in the XML file, you need to have that executed by a webserver first. Internet Explorer doesn't execute ASP code. You need to upload it to a web server with ASP and view in the browser from there.
Re: A name was started with an invalid character
how about using Apache web server?
Re: A name was started with an invalid character
Re: A name was started with an invalid character
put the asp file in the wwwroot and then how to view the file?
i dont know how to use iis server?
Re: A name was started with an invalid character
Make sure it has been started and go to http://localhost/file_name.xml
Re: A name was started with an invalid character
what u mean "has been started"??
Re: A name was started with an invalid character
Goto Internet Information Services under computer management and check that the IIS web service has been started.
Re: A name was started with an invalid character
service and application there got IIS, is it mean started?
Re: A name was started with an invalid character
i have change the IIS port to 8585 and the IIS have started.......and then i put the ASP_Sample.aspx file in the wwwroot...............
in the web browser there i type "http://localhost:8585/ASP_Sample.aspx
but display error message "the page cannot displayed"
what is the problem?
Getting same error "a name was started with an invalid character"
Hi i am also getting the same error but when i access my pages using localhost its opened successfully but while accessing with IP address its giving error have you any idea why i am getting this error.
Ali.
:wave:
Re: A name was started with an invalid character
You'll only get that error if you're running the page against a server that doesn't have ASP installed or has ASP 'locked down'. Look under the web services extension in IIS.