Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading XML document from QTP
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi,

Can anyone tell me using QTP how to read XML values which has multi level nodes, parent, child and store it in a buffer for furture use?
Code:
<root>
      <Parent1> <Parent2> <Parent3>
         <child1>,<child2>,<child3>,....
                <Grandchild1><Grandchild2><Grandchild3>
Thanks,
Sai
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Code:
<Environment>
- <Variable>
  <Name>Path</Name>
  <Value>C:\Documents and Settings\TulasiV\My Documents\Vamshidoc\</Value>
  </Variable>
- <Variable>
  <Name>DataBase</Name>
  <Value>MDB</Value>
  </Variable>
- <Variable>
  <Name>TestCaseID</Name>
  <Value>1</Value>
  </Variable>
- <Variable>
  <Name>TestCaseDiscription</Name>
  <Value>1-QuickSearchRun_03-Sep-08_15-45-27</Value>
  </Variable>
  </Environment>


The above is my XML structure, I am reading the value using the following code, for the XML path I am using the environment variable.

Code:
XMLpath =Environment.Value("QTPxmlPath")


Environment.LoadFromFile =(XMLpath&"\Vamshi.xml")

TestCaseID=Environment.Value("TestCaseID")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading XML Data from a WebPage shaan.mishra87@gmail.com 1 2,251 09-28-2016, 09:16 PM
Last Post: supputuri
  Reading an amount from statement shipu 0 1,929 12-24-2013, 01:42 AM
Last Post: shipu
  Getting an 'Error in XML document' Error when submitting web services XML luckyexpert 0 3,157 08-20-2013, 10:23 PM
Last Post: luckyexpert
  reading a value for GIF image sujaravi123 1 2,533 03-29-2012, 07:47 PM
Last Post: Ankesh
  Exract data from XML using QTP cowboy49 3 15,154 03-27-2012, 10:19 AM
Last Post: cowboy49

Forum Jump:


Users browsing this thread: 1 Guest(s)