|
-
Dec 5th, 2008, 07:16 AM
#1
Thread Starter
Lively Member
How to Parse the XML schema
Code:
<%
case "News"
%>
<div align="center"><img alt="<%=imgtitle%>" src="<%=imgurl%>" id="img2"/></div>
<div align="center" style="padding-top:10px;" class="subheading"><label style="text-align:center">News</label></div>
<br>
<%
dim Serialno
serialNo=1
Set objItems = xmlRSSFeed.getElementsByTagName("item")
' this code disposes of the XML object that contained the entire feed
Set xmlRSSFeed = Nothing
'loop over all the items in the RSS Feed
For x = 0 to objItems.length - 1
' this code places the content from the various RSS nodes into local variables
Set objItem = objItems.item(x)
'Response.Write(x)
For Each objChild in objItem.childNodes
Select Case LCase(objChild.nodeName)
Case "title"
title = objChild.text
Case "link"
link = objChild.text
linkArray(x) = objChild.text
%>
<a href='area.asp?id=test' style="margin-left:1px" class="alink"><%=serialNo%>. <%=title%></a>
<%
Case "description"
description = objChild.text
descarray(x) = objChild.text
getquery="test"
select case getquery
case "test"
%>
<!-- <div><%=descarray(x)%></div>-->
<%
End select
%>
<%
End Select
Next
next
%>
<!--<h4 style="font-size:10"><%=title%></h4>-->
<!--<a href="<%=linkArray(x)%>" style="margin-left:1px" class="alink"><%=serialNo%>. <%=title%></a>-->
<br>
<br>
The XML Schema inside <item> there will be three sub childnodes namely title, Link, Description In the Above code i am using asp+vbscript file in that i have used select case .Each case is a page for me. In the News case i need to Display the New link in News page and when the Click the Link i Need to display the News Description in Other Page. Pls help me regarding this issues.how to track the Link when the User clicks and redirect to next page.without using Onclick and event function.ASAP Thanks in Advance
Last edited by raviram; Dec 5th, 2008 at 07:19 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|