Solved

I am getting ASP error  xmlParseEntityRef: no name. Anyone can help ?

Posted on 2016-09-29
1
46 Views
Last Modified: 2016-10-03
<%
response.ContentType="text/xml"
Response.Charset = "utf-8"
Response.CodePage = 65001
%>
<!-- #include file="../includes/cnf.asp" -->
<%

%>

<%

mySQL =  "select * from MEDICAL order by MED_name   "

rs.CursorLocation = 3
rs.open mySQL, myCon, 0, 1
                                          
                                          
                                          if not rs.eof then
                                          
                                                response.write("<?xml version='1.0' encoding='UTF-8'?>")
response.write("<hospital-clinics>")
                                    
                                                while not rs.eof and rowcount < 100
                                    
                                          
                                          
                              MED_name = rs("MED_name")
                              
      MED_name = Replace(MED_name , "&rsquo;" , "'")
                              
      
            
                                          
            MED_DESC = rs("MED_DESC")
MED_DESC= Replace(MED_DESC , "lsquo" , "")
MED_DESC= Replace(MED_DESC , "&" , "")
MED_DESC= Replace(MED_DESC , "rsquo;" , "'")
MED_DESC= Replace(MED_DESC , "rsquo;" , "'")
MED_DESC= Replace(MED_DESC , "ldquo;" , """")
MED_DESC= Replace(MED_DESC , "rdquo;" , """")
MED_DESC= Replace(MED_DESC , "amp;", "&#038;")
MED_DESC= Replace(MED_DESC , "#39;" , "'")
MED_DESC= Replace(MED_DESC , "nbsp;" , " ")
MED_DESC= Replace(MED_DESC, "ndash;" , "-")
MED_DESC= Replace(MED_DESC, "quot;" , """")

 MED_LOCATION = rs("MED_LOCATION")
 

 
MED_LOCATION= Replace(MED_LOCATION , "lsquo" , "")
MED_LOCATION= Replace(MED_LOCATION , "&" , "")
MED_LOCATION= Replace(MED_LOCATION , "rsquo;" , "'")
MED_LOCATION= Replace(MED_LOCATION , "ldquo;" , """")
MED_LOCATION= Replace(MED_LOCATION , "rdquo;" , """")
MED_LOCATION= Replace(MED_LOCATION, "ndash;" , "-")
MED_LOCATION= Replace(MED_LOCATION, "quot;" , """")



               MED_TEL = rs("MED_TEL")
               
 MED_TEL= Replace( MED_TEL , "lsquo" , "")
 MED_TEL= Replace( MED_TEL , "&" , "")
 MED_TEL= Replace( MED_TEL , "rsquo;" , "' ")
 MED_TEL= Replace( MED_TEL , "ldquo;" , """")
 MED_TEL= Replace( MED_TEL , "rdquo;" , """")
 MED_TEL= Replace( MED_TEL, "ndash;" , "-")
 MED_TEL= Replace(  MED_TEL, "quot;" , """")

               
               

MED_EMAIL= rs("MED_EMAIL")
MED_WEBSITE= rs("MED_WEBSITE")


                                    

response.write("<medical-detail>")
'response.write("<newsid>" & rs("news_id") & "</newsid>")
response.write("<name>" & MED_name&   "</name>")
'response.write("<number>" & MED_TEL & "</number>")

response.write("<location>" & MED_LOCATION & "</location>")
response.write("<Description>" & MED_DESC & "</Description>")
'response.write("<website>" & MED_WEBSITE & "</website>")
'response.write("<email>" & MED_EMAIL & "</email>")
response.write("</medical-detail>")


            %>
       
       
       
          <%
                  count = count + 1
                  rowcount = rowcount + 1      
                  rs.MoveNext
            
                  Wend
                  
                  %>
            <%
            end if
            rs.close
            response.write("</hospital-clinics>")
            %>
0
Comment
Question by:Nikita Sharma
1 Comment
 
LVL 32

Accepted Solution

by:
Big Monty earned 500 total points
ID: 41821623
found this article online

you most likely have an & somewhere in your xml, either remove it or use the Server.HTMLEncode() function on it
1

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now