개발/classic asp2014. 2. 25. 23:23
300x250


<%

Dim xmlString

xmlString = "<table><tr><td>a1</td><td>b1</td><td>c1</td><td>d1</td><td>e1</td></tr><tr><td>a2</td><td>b2</td><td>c2</td><td>d2</td><td>e2</td></tr><tr><td>a3</td><td>b3</td><td>c3</td><td>d3</td><td>e3</td></tr></table>"


Set objXML = Server.CreateObject("Microsoft.XMLDOM")

Set objTTR = Server.CreateObject("Microsoft.XMLDOM")

Set objTTD = Server.CreateObject("Microsoft.XMLDOM")


objXML.async = False

objXML.LoadXML(xmlString)


If objXML.parseError.errorCode <> 0 Then

Response.Write "error!"

End If


Set objTTR = objXML.getElementsByTagName("tr")


noOfHeadlines = objTTR.length


For i = 0 To (noOfHeadlines - 1)

Set objTTD = objTTR.item(i)

'Response.Write("<a href=""" & objTTD.childNodes(1).childNodes(0).Text & """>" & objTTD.childNodes(0).Text & "</a><br>")

Response.Write objTTD.childNodes(0).Text & " " & objTTD.childNodes(1).Text & " " & objTTD.childNodes(2).Text & " " & objTTD.childNodes(3).Text & " " & objTTD.childNodes(4).Text + "<br>" + vbCrLf

Next

%>




300x250
Posted by 마스타