Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: XHTML and nbsp entity XHTML and nbsp entityTo: 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 :)
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
