How can we test an XML using QTP?

I have been to an interview, where they have given me an
XML which had 15 values and they have given those values on
a separate page. They asked me to write a QTP script to
check the XML is having those particular 15 values.

Answer Posted / jitendra

Hello All,
My understanding is that the value stored in an XML file
interms of "Tag" and "Value". A particular value is
assigned to a particular tag.
Ex:
<Environment>
<Variable>
<Name>servername</Name>
<Value>10.22.33.22</Value>
</Variable>
</Environment>

If this XML format is like this then we can write script :
Environment.LoadFromFile("c:\data.xml")
dataToCompare = Environment.Value("servername")

Now we can compare the above value with the required data
in your separate page.

Note:The above solution is also perfect. In my solution the
constraint is that (you have to know the name of all 15
tags)

Make me clear if i am wrong!!

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how will you check how many members visited the website www.infosys.com?

1482


If a button named "CLICK" is recorded in low level recording mode , what will be the values stored for "name" property of that button in object repository ?

1744


why text area checkpoints cannot used for web applications

1883


What is qtpro? What is quick test pro?

564


Can we create a qtp test from qc?

588






what and how to answer for the question "tell me about yourself ?" for 3 years experience. can anyone say inj detail please... its urgent

1341


Thanks....But can u tell me how i use the QTP for GIS with one Example...

1431


Is it possible to use two instances of UFT on the same machine? If not why?

603


How many types of Automation frameworks are there in UFT? Describe them.

559


How to export quicktest professional (qtp) results to an .xls file?

601


How to find the path of folder in which the test is saved in qtp?

534


What is checkpoints for qtp?

536


There are 10 rows in the datatable. How can we fetch 2 rows and then skip 3rd row. After that, pick 4th & 5th row and skip 6th row. Please share code

1214


This is Karthic and my mail id is karthic.venkitapathi@gmail.com, please give me an idea to crack qtp 10

1507


Should have experience in framework means?

1417