Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read XML from Web page...help req..!!
#1
Not Solved
hi i need to read the output from a HTML page which is a XML data and then store the individual values in the DB. Below is the output which i got using "GetROproperty.innertext" of the Web page.

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <RespGetDeck xmlns="http://www.xyz.com"> <Category><CatID>1234</CatID> <CatName><![CDATA[ data ]]> </CatName><CatDisplayName> <![CDATA[ data ]]> </CatDisplayName><CatDescription> <![CDATA[ data - DD - 272 ]]></CatDescription><ServiceName /><Position>1</Position><Icon> <URL /> <MimeType /> </Icon><DeviceIcon><URL /> <MimeType /></DeviceIcon><DisplayDriver>111</DisplayDriver></Category><TotalCount>11</TotalCount><RespMsg><Code>900</Code><Desc>SUCCESS</Desc></RespMsg></RespGetDeck>

There are two problems:
1. I need to remove the extra characters from the XML data like "-" or spaces in tags. However if i view the source of the HTML page its all fine there. So is there a way to get the View Source of the HTML page??
2. While traversing thru the XML m not able to get all the elements. m usin
Set xmlDoc = CreateObject("Msxml2.DOMDocument")"
Is there another way to do that.

Also the hierarchy in XMl data may vary every time in the HTML output so i need to write a genric function so that i can traverse thru the nodes,childnodes,attributes and store them.

Thanks in Advance..
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,355 07-10-2017, 04:20 PM
Last Post: rajeevk7
  click each web link in a page using Index or other method in QTP smeijer 13 24,820 04-29-2017, 04:53 PM
Last Post: kowshik
  VB Script to count number of links in a web page. Suma Parimal 4 25,377 07-01-2015, 12:59 PM
Last Post: govind
  Cannot find the "[ WebButton ]" object's parent "[ Page ]" (class Page) sumitparolkar@gmail.com 4 5,174 05-03-2013, 11:53 PM
Last Post: agarwl.anurag
  How to test a Web page Monica Soneja 3 3,561 04-09-2013, 06:37 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)