Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
qtp script for updating values in xml file
#3
Not Solved
Hi All

I tried the above mentioned logic but i'm getting "object Required: 'node'" error. Can anyone please help me on this ?

My code:

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

XMLDataFile = "C:\Users\neelakantan.lavanya\Desktop\115028_ASSET.xml"
xmlDoc.Load (XMLDataFile)
Datatable.ImportSheet "C:\Users\neelakantan.lavanya\Desktop\Orange_data.xlsx", "XML", 1

' update the title of the first book
Set node = xmlDoc.SelectSingleNode("/ListOfOrder/Order/Status")                  '----- > order of the nodes in ur xml file

node.Text = "Close"

' save changes
xmlDoc.Save(XMLDataFile)
Reply


Messages In This Thread
RE: qtp script for updating values in xml file - by Lavanya N - 11-30-2015, 10:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sending json file request and validating response in soap UI tool using Groovy script smiley 0 3,884 07-19-2017, 04:58 PM
Last Post: smiley
  Extract and save a file from zip folder using VB Script karthicksri07 1 6,431 06-29-2016, 02:19 PM
Last Post: Ankesh
  Updating Shared repository vinod_3466 3 4,526 06-29-2016, 02:16 PM
Last Post: Ankesh
  Updating the web table Ananth1982 0 1,889 03-04-2015, 02:31 AM
Last Post: Ananth1982
  Attaching config file in driver script?? ruchi 3 4,152 01-24-2014, 12:32 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 2 Guest(s)