Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XHTML and nbsp entity

From: "xtreem" <invalid@-------.--->
To: NULL
Date: 10/2/2004 12:30:00 AM
I am trying to parse some XHTML which apparently is XML compliant, using the 
following bit of vbscript

set xmlhttp = CreateObject("Msxml2.XMLHTTP.4.0")
set xmlDoc = CreateObject("Msxml2.DOMDocument.4.0")

xmlhttp.Open "GET", "http://www.audioscrobbler.com/", false
xmlhttp.Send

res = xmlhttp.responsetext
xmldoc.validateonparse = false
xmldoc.resolveexternals = false

xmldoc.loadxml res

If (xmlDoc.parseError.errorCode <> 0) Then
   Dim myErr
   Set myErr = xmlDoc.parseError
   MsgBox(myerr.reason + "  " + myErr.srctext)
end if

But I keep getting the error:
Reference to undefined entitiy 'nbsp'

I have read about all sorts of solutions to this, but they typically involve 
getting rid of nbsp in some way or another in the source. Is there a way to 
solve it when you have no control over the source? ie. perhaps I could add 
the nbsp entity then append the xml somehow?

Also, when I set 'resolveexternals' to true, I get an error about 
'processing resource xhtml-strict.dtd' or something. The source document 
doesnt fully qualify the dtd to w3c.org, but is that necessary? It seems 
strange that w3c.org would be hit every single time an xml document is 
parsed...

Thanks for any help :) 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent