msxml

MSXML2.XMLHTTP send method works with early binding, fails with late binding

别来无恙 提交于 2019-12-18 03:37:20
问题 The code below works. But if I comment out the line Dim objRequest As MSXML2.XMLHTTP and uncomment the line Dim objRequest As Object it fails with the error message : The parameter is incorrect Why, and what (if anything) can I do about it? Public Function GetSessionId(strApiId, strUserName, strPassword) As String Dim strPostData As String Dim objRequest As MSXML2.XMLHTTP 'Dim objRequest As Object ' strPostData = "api_id=" & strApiId & "&user=" & strUserName & "&password=" & strPassword Set

How to make Microsoft XmlHttpRequest honor cache control directive

瘦欲@ 提交于 2019-12-17 18:26:22
问题 i'm issuing a request using MSXML's XmlHttpRequest object: IXMLHttpRequest http = new XmlHttpRequest(); http.open("GET", "http://www.bankofcanada.ca/stat/fx-xml.xml", False, "", ""); http.send(); And the send succeeds, and i get my xml data. Except that XmlHttpRequest didn't actually hit the network (i can see there no actual http request issued). And Process Monitor shows the file is actually being served from my cache: So i want to instruct the XmlHttpRequest user agent that any cached

How to use node-set function in a platform-independent way?

房东的猫 提交于 2019-12-17 09:58:43
问题 I'm writing some xlst file which I want to use under linux and Windows. In this file I use node-set function which declared in different namespaces for MSXML and xsltproc ("urn:schemas-microsoft-com:xslt" and "http://exslt.org/common" respectively). Is there any platform independent way of using node-set? 回答1: You can use the function function-available() to determine which function you should use: <xsl:choose> <xsl:when test="function-available('exslt:node-set')"> <xsl:apply-templates select

Macro / VBA to fetch values from www.Eppraisal.com

对着背影说爱祢 提交于 2019-12-14 03:58:26
问题 I need to fetch some values from www.Eppraisa.com using Excel Macro. But I don't know what should be the value of PropID. That's why the macro works for URL1 but not for URL2 because I think URL2 has a wrong propID Const URL1 As String = "http://www.eppraisal.com/home-values/property_lookup_eppraisal?a=1122%20E%20Loyola%20Dr&z=85282&propid=42382460" Const URL2 As String = "http://www.eppraisal.com/home-values/property_lookup_eppraisal?a=19732%20E%20Reins%20Rd&z=85142&propid=31402642" Sub

Tracking down COM interface/SysAlloc leaks

为君一笑 提交于 2019-12-13 19:54:25
问题 I've inherited some terrible MSXML parsing code (which sadly I don't have time to rewrite). This code is full of COM interface/BSTR leaks where the original authors have either misused manual COM reference counting (which always seems to end in tears) or where they've used COM smart pointers but used them wrongly such that leaks have occurred. I've now fixed many of the leaks in the code but I'm still finding that msxml3.dll isn't unloaded when I call CoUninitialize() (which it should be if

Using MSXML2.ServerXMLHTTP to access data from a web page returns truncated data in Lua

…衆ロ難τιáo~ 提交于 2019-12-13 05:28:29
问题 I am trying to download a source code file from a web site which works fine for small files, but a couple of larger ones get truncated. The example below should be returning a file 146,135 bytes in size, but returns one of 141,194 bytes with a status of 200. I have tried winhttp.winhttprequest.5.1 as well, but both seem to truncate at the same point. I have also found quite a few people with similar problems, but have not been able to find a solution. require('luacom') http = luacom

MSXML2::IXMLDOMDocument2Ptr->GetXML() messing up my string!

浪子不回头ぞ 提交于 2019-12-12 23:12:43
问题 All, this is my code //declare string pointer BSTR markup; //initialize markup to some well formed XML <- //declare and initialize XML Document MSXML2::IXMLDOMDocument2Ptr pXMLDoc; HRESULT hr; hr = pXMLDoc.CreateInstance(__uuidof(MSXML2::DOMDocument40)); pXMLDoc->async = VARIANT_FALSE; pXMLDoc->validateOnParse = VARIANT_TRUE; pXMLDoc->preserveWhiteSpace = VARIANT_TRUE; //load markup into XML document vtBoolResult = pXMLDoc->loadXML(markup); //do some changes to the XML file<- //get back

ServerXmlHttpRequest hanging sometimes when doing a POST

一世执手 提交于 2019-12-12 03:30:04
问题 I have a job that periodically does some work involving ServerXmlHttpRquest to perform an HTTP POST . The job runs every 60 seconds. And normally it runs without issue. But there's about a 1 in 50,000 chance (every two or three months) that it will hang: IXMLHttpRequest http = new ServerXmlHttpRequest(); http.open("POST", deleteUrl, false, "", ""); http.send(stuffToDelete); <---hang When it hangs, not even the Task Scheduler (with the option enabled to kill the job if it takes longer than 3

How can I get the XML nodes from this XML in classic ASP (MSXML)?

穿精又带淫゛_ 提交于 2019-12-11 13:47:14
问题 OK, I'm at my wits end. This seems like it should be a completely trivial thing to do, yet after an hour I still just cannot make it work. I'm trying to get a list of time zones from the Campaign Monitor API; unfortunately the page I need to do this in is written in classic ASP/Javascript so I can't just use the API wrapper. I'm making the request like this: var request = Server.CreateObject("Msxml2.ServerXMLHTTP"); request.open("GET", apiurl + "/User.GetTimezones?ApiKey=" + apikey, false);

Need help stopping MSXML from adding namespaces

徘徊边缘 提交于 2019-12-11 12:13:45
问题 I am using MSXML 4 to generate the following xml string: <?xml version="1.0"> <Parent_Element xmlns="http://1"> <Child_One> <Child_Two xmlns="http://2"> <Child_Three> </Child_Three> </Child_Two> </Child_One> </Parent> However the output from my IXMLDOMDocument2Ptr always includes a namespace for Child_Three: <?xml version="1.0"> <Parent_Element xmlns="http://1"> <Child_One> <Child_Two xmlns="http://2"> <Child_Three xmlns="http://1"> </Child_Three> </Child_Two> </Child_One> </Parent> My