msxml

MSXML2.ServerXMLHTTP.4.0 Source?

≯℡__Kan透↙ 提交于 2019-11-29 07:23:25
Where does the object "MSXML2.ServerXMLHTTP.4.0" come from? Which install package? I'm attempting to do the following: Set oXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.4.0") This attempt fails on my development machine (no object is returned) but it is successful on my colleague's development machine. Obviously, he has something installed that I don't or vice versa but where does this object, dll, etc come from? What would I need to install to get this call to work? For the record, changing the object to a different version isn't an option because code that this depends on was tested for

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

随声附和 提交于 2019-11-29 02:13:47
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 objRequest = New MSXML2.XMLHTTP With objRequest .Open "POST", "https://api.clickatell.com/http/auth",

Looping through XML using VBA

限于喜欢 提交于 2019-11-28 23:53:23
I'm trying to loop through the following simple XML using VBA, with the ultimate goal to be able to easily extract the data in sequence. <?xml version="1.0"?> <PMRData> <Staff StaffName="Person 1"> <Openings>1.1</Openings> <Closures>1.11</Closures> </Staff> <Staff StaffName="Person 2"> <Openings>1.2</Openings> <Closures>1.22</Closures> </Staff> <Staff StaffName="Person 3"> <Openings>1.3</Openings> <Closures>1.33</Closures> </Staff> </PMRData> My code so far manages to get the data into the Immediate Window but not in the order I need it. It should be: Staff Name Person1 Openings 1.1 Closures 1

schema validation with msxml in delphi

我是研究僧i 提交于 2019-11-28 19:54:30
I'm trying to validate an XML file against the schemas it references. (Using Delphi and MSXML2_TLB.) The (relevant part of the) code looks something like this: procedure TfrmMain.ValidateXMLFile; var xml: IXMLDOMDocument2; err: IXMLDOMParseError; schemas: IXMLDOMSchemaCollection; begin xml := ComsDOMDocument.Create; if xml.load('Data/file.xml') then begin schemas := xml.namespaces; if schemas.length > 0 then begin xml.schemas := schemas; err := xml.validate; end; end; end; This has the result that cache is loaded ( schemas.length > 0 ), but then the next assignment raises an exception: "only

Make XML elements required based on attribute values in XSD

左心房为你撑大大i 提交于 2019-11-28 12:50:59
My requirement is to have an XSD file which checks the elements based on attribute values. I was able to write XSD up to a point where I can restrict the attribute values of Application/@Type . Can anyone help me to complete the XSD file where I can make some elements required based on the Application/@Type attribute? I want to make PackageArg required only when Application/@Type is "Batch" Version required only when Application/@Type is "Service" Project required only when Application/@Type is Web" or "Service" XML File <Applications> <Application Name="ConfigManagement" Type="Web">

Login into website using MSXML2.XMLHTTP instead of InternetExplorer.Application with VBA

耗尽温柔 提交于 2019-11-28 07:53:53
first time posting, I'm trying to get the ID "dadosDoUsuario" from a website's page I have to be logged in. I got it working using "InternetExplorer.Application" object, but can't get the ID value when using "MSXML2.XMLHTTP" object. It seems it won't go past the login page, since I'm able to get other IDs from this page (example: "tituloPagina"). Could someone give a hint on how I get the data from the page after logged in? Thanks! InternetExplorer.Application code (this one works): Sub testIE() Dim texto As String Set ie = CreateObject("InternetExplorer.Application") my_url = "https://www.nfp

Why does createProcessingInstruction in MSXML generate incomplete output?

非 Y 不嫁゛ 提交于 2019-11-28 07:49:17
问题 The following VBA code generates <?xml version="1.0"?> as output. Dim XML As New DomDocument Dim pi As IXMLDOMProcessingInstruction '.... some code that sets the root element of the document Set pi = XML.createProcessingInstruction("xml", "version='1.0' encoding='UTF-8'") XML.insertBefore pi, XML.documentElement Why is the encoding="UTF-8" left out? 回答1: UTF-8 is the default encoding anyway. What you've specified is redundant, so the serializer likely omits it. The version field is not an

How to make Microsoft XmlHttpRequest honor cache control directive

混江龙づ霸主 提交于 2019-11-28 07:15:41
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 content older than 0 seconds is too old. The standards way to do this is to add a request header: Cache

Error from VB excel macro code - msxml3.dll -2146697211 The system cannot locate the resource specified

谁说我不能喝 提交于 2019-11-28 02:20:14
I am using an MSXML.HTTPRequest object in a VB macro (excel) to communicate with an HTTP server. The problem is that it throws the following error intermittently. msxml3.dll -2146697211 The system cannot locate the resource specified. I noticed on my system that this happened when the network was down, but my client has complained of it happening intermittently on his machine. Given that his system has Windows 7 installed and it is working at times, I don't think it is an issue of the correct library not being installed. He has tried it on a few networks, but it still fails. Function

Delphi/MSXML: XPath queries fail

徘徊边缘 提交于 2019-11-28 01:28:50
问题 I've loaded a XML document, and now I wish to run a XPath query to select a certain subset of the XML. The XML is <?xml version="1.0"?> <catalog xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> </catalog> and the procedure