I encounter this error in xml that is loaded to an asp
page. 

What is this error and how can I fix it? Thanks.

errorCode: -1072898046
reason: Reference to undefined entity 'eacute'.
line: 110
linePos: 23
srcText: Sun Microsystems Fort� 4GL.
url: file:///R:/ganERWIFiles/308789.xml
filePos: 14675 


The problem is that the xml file is only given to us
by our client. You think the error is from the xml
file and not in the asp?  Because when I load the xml
file in the Internet Explorer it works but when I run
it throught asp it doesn't. 

<%@ Language=VBScript%>
<%
function tree_walk(node)
dim nodeName
    For Each child In node.childNodes
        If (child.nodename="puburl") Then
            strReturnURL = child.text
        ElseIf (child.nodename="docabstract") Then
            strDescription = child.text
        ElseIf (child.nodename="doctitle") Then
            strTitle = child.text
        ElseIf (child.nodename="docsearch") Then
            strArticle = Replace(child.text, "&", "")
        End If
        If (child.hasChildNodes) Then
            tree_walk(child)
        End If
    Next
end function

Dim root
Dim xmlDoc
Dim child
Dim strFileName

dim strReturnURL
dim strDescription
dim strTitle
dim strArticle

'if drive already connected from previous run, ignore
the error and continue
On Error Resume Next

dim oNet
Set oNet = Server.CreateObject("WScript.Network")
oNet.MapNetworkDrive "R:", "\\erwinserver", False,
"erwinusername", "erwinpassword"


Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
xmlDoc.async = False

xmlDoc.resolveExternals = False

strFileName = "R:/Erwinfiles/" &
request.QueryString("sf")

xmlDoc.load(strFileName)
If xmlDoc.parseError.errorcode = 0 Then
    'Walk from the root to each of its child nodes:
    tree_walk(xmlDoc)
Else
    response.write ("<br>errorCode: ")
    response.write xmlDoc.parseError.errorCode
    response.write ("<br>reason: ")
    response.write xmlDoc.parseError.reason
    response.write ("<br>line: ")
    response.write xmlDoc.parseError.line
    response.write ("<br>linePos: ")
    response.write xmlDoc.parseError.linePos
    response.write ("<br>srcText: ")
    response.write xmlDoc.parseError.srcText
    response.write ("<br>url: ")
    response.write xmlDoc.parseError.url
    response.write ("<br>filePos: ")
    response.write xmlDoc.parseError.filePos
    response.write ("<br>")
End If

'close objects
oNet.RemoveNetworkDrive "R:"
Set oNet = Nothing

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<%if trim(strReturnURL) = "" then
    response.Write("<meta name=""robots""
content=""noindex,nofollow"">") & vbCRLF
else%>
    <%response.Write("<meta name=""ReturnURL""
content=""" + strReturnURL + """>") & vbCRLF%>
    <%response.Write("<meta name=""description""
content=""" + strDescription + """>") & vbCRLF%>
    <%response.Write("<meta name=""ItemSource""
content=""Gartner"">") & vbCRLF%>
    <%response.Write("<title>" + strTitle +
"</title>") & vbCRLF%>
<%end if%>
</head>
<body>
<%'response.Write(strFileName) & "<br>"%>
<%response.Write(strArticle) & vbCRLF%>
</body>
</html>

Erwin Rommel Y. Felix
Tel. 8410111 loc. 11430
Mobile 09185980706
 
"Never outshine the Master Chicker"





                
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to