Traversing all nodes in an XML file with VBScript
Please, try this: set nodes = xmlDoc.selectNodes(“//*”) for i = 0 to nodes.length document.write(nodes(i).nodeName & ” – ” & nodes(i).text & “<br />”) next
Please, try this: set nodes = xmlDoc.selectNodes(“//*”) for i = 0 to nodes.length document.write(nodes(i).nodeName & ” – ” & nodes(i).text & “<br />”) next
Yes, there is a good and universal solution. EXSLT‘s function common:node-set() can be implemented as an inline Javascript function and is thus available with any browser that supports Javascript (practically all major browsers without exception). This technique was first discovered by Julian Reschke and after he published it on the xsl-list, was publicized by David … Read more
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/properties/declaration-handler”, _ Writer) Call … Read more
If you need to support Windows OS versions prior to Win2k, then use MSXML3. Otherwise, use MSXML6. MSXML4 is in maintenance mode. MSXML5 was never actually supported for use outside of MS-Office. See: List of Microsoft XML Parser (MSXML) versions Using the right version of MSXML in Internet Explorer
Don’t use MSSOAP. I think it is out of support now, for the past 3 or 4 years. Consider using the XmlHttp, which is part of MSXML, and is supported and continues to be maintained. You will have to construct a SOAP envelope manually. But it’s more reliable this way. example code ‘ URL to … Read more
As its 60,000 records i recommend use xmlHTTP object instead of using IE. HTTP requests a easier, and a lot faster Download the sample file Sub XMLHTTP() Dim url As String, lastRow As Long, i As Long Dim XMLHTTP As Object, html As Object, objResultDiv As Object, objH3 As Object, link As Object Dim start_time … Read more