Solved

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

Posted on 2016-09-29
1
43 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
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.…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

12 Experts available now in Live!

Get 1:1 Help Now