07-09-2008, 04:59 PM
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.
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..
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..