p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP XML (http://p2p.wrox.com/forumdisplay.php?f=69)
-   -   problem parsing html using MS.XMLHTTP (http://p2p.wrox.com/showthread.php?t=3836)

awardle September 13th, 2003 06:12 AM

problem parsing html using MS.XMLHTTP
I've been working on this asp page for ages now and can not seem to get my head around it,

bascailly when i do a response.write any '£' symbols are being replaced with '?' doing a response.binarywrite shows the correct symbols but this is no good to me as I need to parse the data.

the code I am using is shown below, any help on this matter would be much appreciated.

Thanks Aaron

URL = "http://cgi6.ebay.co.uk/ws/eBayISAPI.dll?ViewSellersOtherItems&include=0&user id=grand2010&sort=2&rows=25&since=-1&rd=1"
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")'
objXMLHTTP.Open "GET", URL, false

sHTML = objXMLHTTP.responseText
Set objXMLHTTP = Nothing

jammin September 15th, 2003 11:38 PM

This one got me too..

XMLHTTP returns the results as a unicode string.

To solve this, I used Server.CreateObject("WinHttp.WinHttpRequest.5.1") instead. All properties and methods are the same.

This component is available by default on any Windows 2000 Server with SP3. It works in exactly the same way, but for some reason does not return ResponseText as unicode.

If for some reason you MUST use the XMLHTTP component, let me know and I'll explain how (it involves converting the binary output to a string, a time consuming task!)

All times are GMT -4. The time now is 03:51 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.