msxml

result tree fragment to node-set: generic approach for all xsl engines

允我心安 提交于 2019-11-28 01:16:46
问题 Answering another thread (see stackoverflow: generate css color schemes) I bumped into the issue below, where different xsl engines seem to need different approaches in transforming result tree fragments into node-sets. Simplifying the issue (but see link above for the full story behind this), I wish to have an inline tree containing a list of color values. As this has to be used in Xpath expressions, I had to create a node-set from it specifically for MSXML x.x xsl engine (XML Spy built-in

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

て烟熏妆下的殇ゞ 提交于 2019-11-27 19:12:50
问题 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

Traversing all nodes in an XML file with VBScript

瘦欲@ 提交于 2019-11-27 16:11:50
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/vbscript"> Set xmlDoc=CreateObject("Microsoft.XMLDOM") xmlDoc.async="false" xmlDoc.load("test.xml") Dim

schema validation with msxml in delphi

血红的双手。 提交于 2019-11-27 12:34:33
问题 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

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

谁说我不能喝 提交于 2019-11-27 09:47:42
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.GetDirectoryName(ParamStr(0)), '1-Normal.xml'); if not XmlDocument.load(XmlFileName) then Parse(XmlDocument

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

梦想与她 提交于 2019-11-27 09:41:11
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? James Sulak 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="exslt:node-set($nodelist)" /> </xsl:when> <xsl:when test="function-available('msxsl:node-set

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

久未见 提交于 2019-11-27 07:38:30
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. Daniel Rikowski 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.dtdHandler = Writer Set Reader.errorHandler = Writer Call Reader.putProperty("http://xml.org/sax

Make XML elements required based on attribute values in XSD

风格不统一 提交于 2019-11-27 07:25:16
问题 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

Which version of MSXML should I use?

萝らか妹 提交于 2019-11-27 06:57:33
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 question : Does anyone have a summary of the differences between the various versions of MSXML over time?

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

懵懂的女人 提交于 2019-11-27 01:43:18
问题 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