How to retrive XML file data in QTP ? using Script(Chandana)
Answer Posted / nidhi jain
Chandan, below is solution
Const XMLDataFile = <your file path>
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = False
xmlDoc.Load(XMLDataFile)
Set nodes = xmlDoc.SelectNodes(<provide you node hierarchy>)
MsgBox "Total books: " & nodes.Length
Set nodes = xmlDoc.SelectNodes("<node hierarchy>/text()")
' get their values
For i = 0 To (nodes.Length - 1)
Title = nodes(i).NodeValue
MsgBox "Title #" & (i + 1) & ": " & Title
Next
I hope this will be helpful.
| Is This Answer Correct ? | 9 Yes | 5 No |
Post New Answer View All Answers
HOW AUTOMATE TEST SCRIPT ? what time it will do? after gneration of basic script or Any , Plz explain detailed?
How to indentify MS-Word objects like Menubar, Toolbar, table/columns/rows/cells etc within Word document, using QTP?
How do you synchronization point through DP?
How to analyzing test results using quicktest professional (qtp)?
I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.
why you have standardized functions? plzzz guys with real time exp. do answer
How will you handle java tree in qtp?
Give me At Least 5 Differences between DOCUMENTATION OBJECT MODEL(DOM)and COMPONENT OBJECT MODEL(COM)? Interviewer said me to WRITE the difference only in points not as you WRITE a paragraph ???? only in points
Where to use function or action?
How may types of defects identify application or your currently working application?pls give me answer..
How QTP identify the system time that's changes every seconds?
Explain the types of properties that quick test learns while recording?
What is post recovery scenario?
QTP script is not working on other's machine..
can any body give the banking domain concepts/links