Forum Discussion

jkrolczy's avatar
jkrolczy
Regular Contributor
5 years ago

TestComplete: Win10: How to read an XML file

I am trying to read an XML file and log out the contents.   Going by the example in the TestComplete help, I get 'Object expected' from using either of the line of code below.   // If you have M...
  • jkrolczy's avatar
    jkrolczy
    5 years ago

    Figured it out.

     

    Looked at syntax for Javascript instead of Jscript:

     

    Should be:

     

    1.   // If you have MSXML 4:
        var Doc = Sys.OleObject("Msxml2.DOMDocument.4.0");


        // If you have MSXML 6:
        var Doc = Sys.OleObject("Msxml2.DOMDocument.6.0");