Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need to extract data from XML to excel in QTP
#1
Not Solved
Hi,
I need to extract some attributes values and element text data from
XML to excel.
Can some one help me.
Hierarch of xml elements is
on>programs>program>images>image>URI
I need to get an attribute TMSID from program element. And for each
TMS ID, need to get image elements category attribute and URI elements
text values. Need to save all this into an external excel sheet. And
for some of the program elements images/image does'nt exist.

Sample XML is attached


Attached Files
.zip   read.zip (Size: 1.12 KB / Downloads: 77)
Reply
#2
Not Solved
You can use DOM objects to extract values from XML files based on tag names and then store it tovariables and then save it to excel
Reply
#3
Not Solved
Well I want to know how to read the values in hierarchy.
1) If Program element is the parent with TMSID attribute, image is grand child which may or may not exist for each program element. (Program/images/image is the hierarchy) And if exists there may be multiple occurrences also.
When there are multiple occurrences excel should get a row for a program's TMSID, each Image category attribute& URI text value combination

2) URI element is the child of image whose text value I want to get for program TMSID attribute.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Want to read the data from excel and set read value in the JavaTable rajeevk7 0 2,161 07-10-2017, 04:20 PM
Last Post: rajeevk7
  dtLocalSheet empty even though excel file contains data cantorre 2 2,202 05-10-2017, 12:47 PM
Last Post: vidhi
  Reading data from excel sheet serenediva 1 8,780 03-03-2017, 10:07 AM
Last Post: vinod123
  Extract and save a file from zip folder using VB Script karthicksri07 1 6,182 06-29-2016, 02:19 PM
Last Post: Ankesh
  qtp script for updating values in xml file automation2012 3 11,260 11-30-2015, 11:07 AM
Last Post: Lavanya N

Forum Jump:


Users browsing this thread: 1 Guest(s)