-
Parsing XML page Using in VB.NET
My requirement is to parse xml page and display them in word doc.
I had no problem doing above mentioned task, but i was happened to hyperlink some of my parsed data.
Would appreciate help!!!
Here is my main script in vb.net
**********************************************************
<%@ Import Namespace="System.XML" %>
<script language="VB" Runat="server">
Sub display_result()
Dim Xread as XMLTextReader = new XMLTextReader(Server.MapPath(www.test.org/test.xml"))
strOut += "<table border=0 cellpadding=2 cellspacing=0 width=100%>"
try
While xread.Read()
Select Case xread.NodeType
Case XMLNodeType.Element
If xread.Name = "post_title" Then
strOut += "<tr><td><font face=Arial size=2><b>" & xread.ReadString() & "</b></font><br>"
Else If xread.Name = "post_url" Then
strOut += "<font face=Arial size=1>" & xread.ReadString() & "</font><br>"
End If
End Select
End While
Catch ex as Exception
Response.Write("Error")
Finally
xread.close()
End try
strOut += "</table>"
lblXML.Text = strOut
End Sub
</script>
**********************************************************
-
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
Bookmarks