Expected End statement error - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Expected End statement error (/Thread-Expected-End-statement-error) |
Expected End statement error - Lavanya N - 07-21-2015 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 I am getting "Expected End statement" error in line: Code: Set nodes = xmlDoc.SelectNodes Datatable.Value ("XML_Node") Pls help in resolving this RE: Expected End statement error - kbhargava505 - 07-22-2015 Hi, Replace the line Code: Set nodes = xmlDoc.SelectNodes Datatable.Value ("XML_Node") with Code: Set nodes = xmlDoc.SelectNodes( Datatable.Value ("XML_Node",Global)) and replace the line Code: Id = nodes(i).NodeValue with Code: Id = nodes(i).Text RE: Expected End statement error - Lavanya N - 07-27-2015 Hey Bhargava...... ur code worked out.....!!! Thanks a Lottt |