Jump to the post that solved this thread.
Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Expected End statement error
#1
Solved: 9 Years, 4 Months ago
Hi All
I am using the below code to retrieve data from xml file. I need to retrieve xml value for many nodes hence thought of passing the node path for xml from datasheet. But when I execute the code i'm getting "Expected End statement" error.

Please find the code below:

Code:
Datatable.ImportSheet "filepath", "sheetname", 1

Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = False

XMLDataFile = "xmlFilepath"
xmlDoc.Load (XMLDataFile)

Set nodes = xmlDoc.SelectNodes Datatable.Value ("XML_Node") 'Here I'm passing "/ListOfOrder/Order/Id/text()" value in datasheet
    
msgbox "total count of id tag is " & nodes.length

For i = 0 To (nodes.Length - 1)

Id = nodes(i).NodeValue

Msgbox  "The name of Author is " & Id

Next

I am getting "Expected End statement" error in line:
Code:
Set nodes = xmlDoc.SelectNodes Datatable.Value ("XML_Node")

Pls help in resolving this
Reply
Jump to the post that solved this thread.


Messages In This Thread
Expected End statement error - by Lavanya N - 07-21-2015, 03:16 PM
RE: Expected End statement error - by Lavanya N - 07-27-2015, 01:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to check expected cookies are present or not priyanka.agarwal 0 1,969 07-02-2015, 12:43 PM
Last Post: priyanka.agarwal
  Validate Numeric value is displaying expected format kalaivanan123 1 3,505 09-23-2013, 08:45 PM
Last Post: ravi.gajul
  closing browser at end bistritapcv 3 6,204 04-12-2013, 07:21 AM
Last Post: basanth27
  QTP: code is not working as expected mahi392 0 2,214 09-17-2012, 10:56 PM
Last Post: mahi392
  expected ')' error sia sharma 8 5,876 08-30-2012, 04:30 PM
Last Post: sshukla12

Forum Jump:


Users browsing this thread: 2 Guest(s)