Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2016-09-29
1
Medium Priority
?
111 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 34

Accepted Solution

by:
Big Monty earned 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Screencast - Getting to Know the Pipeline

963 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