msxml

Calling WCF service by VBScript

廉价感情. 提交于 2019-11-26 22:42:29
There is a WCF service with configuration: <services> <service name="MyService" behaviorConfiguration="MyServiceBehavior"> <endpoint binding="basicHttpBinding" contract="IMyService" /> <host> <baseAddresses> <add baseAddress="http://localhost:8001/MyService" /> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior name="MyServiceBehavior"> <serviceMetadata httpGetEnabled="True" /> </behavior> </serviceBehaviors> </behaviors> This script is supposed to call it: Option Explicit Dim soapClient Dim serviceUri Dim serviceName Dim portName Dim result serviceUri =

Traversing all nodes in an XML file with VBScript

匆匆过客 提交于 2019-11-26 18:34:42
问题 I have written a VBScript which is supposed to tranverse all nodes in an XML file, irrespective of the depth of the tree. This it does well except that the node names for the those nodes which are 2 or more levels deep are not displayed. I need the node names as well as the values so that I have name/value pairs for further processing by other programs. Can anyone please help me in getting the missing node names displayed. Below is my code: <html> <head> </head> <body> <script type="text

How can I pretty-print XML source using VB6 and MSXML?

僤鯓⒐⒋嵵緔 提交于 2019-11-26 17:40:56
问题 I've been looking after this for months now and I mostly found sites asking the same question. The answers I did found were always for .NET or C++ or involved XSLT. 回答1: After months of research I've come up with this. Public Function PrettyPrintXML(XML As String) As String Dim Reader As New SAXXMLReader60 Dim Writer As New MXXMLWriter60 Writer.indent = True Writer.standalone = False Writer.omitXMLDeclaration = False Writer.encoding = "utf-8" Set Reader.contentHandler = Writer Set Reader

Which version of MSXML should I use?

杀马特。学长 韩版系。学妹 提交于 2019-11-26 17:36:38
问题 Seems like this would be a common question, though I could not find it on SO. Which version of MSXML should I use in my applications, and more importantly, how should I decide? There is MSXML3, 4, 5 and 6. I recently posted some code in calling-wcf-service-by-vbscript that used MSXML v4. AnthonyWJones posted that I shouldn't use 4, but instead 3 or 6, but probably 3. Certainly not v5! Why? I'd like to know more about the criteria for selecting the version of MSXML to use in my apps. Bonus

Traversing all nodes in an XML file with VBScript

∥☆過路亽.° 提交于 2019-11-26 17:26:00
问题 I have written a VBScript which is supposed to tranverse all nodes in an XML file, irrespective of the depth of the tree. This it does well except that the node names for the those nodes which are 2 or more levels deep are not displayed. I need the node names as well as the values so that I have name/value pairs for further processing by other programs. Can anyone please help me in getting the missing node names displayed. Below is my code: <html> <head> </head> <body> <script type="text

Error when loading valid Windows-1252 document “System error: -2146697210”

回眸只為那壹抹淺笑 提交于 2019-11-26 14:55:57
问题 Somehow, sometimes the code below generates an error when loading valid Windows-1252 XML. It fails on Windows XP Professional x86 SP3 using MSXML6. It succeeds on Windows 7 Ultimate x64 SP1 using MSXML6. Note: the code below is written in Delphi, but equivalent code also fails in other environments. procedure TXMLEOSErrorTestCase.Test; var XmlDocument: IXMLDOMDocument3; XmlFileName: string; begin XmlDocument := CoFreeThreadedDOMDocument60.Create(); XmlFileName := TPath.Combine(TPath

Calling WCF service by VBScript

落花浮王杯 提交于 2019-11-26 08:25:22
问题 There is a WCF service with configuration: <services> <service name=\"MyService\" behaviorConfiguration=\"MyServiceBehavior\"> <endpoint binding=\"basicHttpBinding\" contract=\"IMyService\" /> <host> <baseAddresses> <add baseAddress=\"http://localhost:8001/MyService\" /> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior name=\"MyServiceBehavior\"> <serviceMetadata httpGetEnabled=\"True\" /> </behavior> </serviceBehaviors> </behaviors> This script is

Using VBA in Excel to Google Search in IE and return the hyperlink of the first result

≯℡__Kan透↙ 提交于 2019-11-26 02:58:06
问题 I have been attempting to use IE automation to google search a string of text in Excel. I want to return the hyperlink for the website of the first result in another cell in excel. Is this possible? I have a list of 60,000 records that I need to google search and return the hyperlink for the website in the first result. Is there another approach to this that you would reccomend? I appreciate the help in advance. 回答1: As its 60,000 records i recommend use xmlHTTP object instead of using IE.