473,608 Members | 2,667 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

newbie to xml rss

19 New Member
Brand new to xml and I'm trying to get Scott Mitchell's rss aggregator example working locally. Basically, involves a frameset with the channels(feeds) in the left frame, a list of items in the channel in the lower right, and the single item in the top right based on a selection in the lower right. When the channel within the left frame is clicked, bottom right frame changes with the items for the channel (feed). Taking it step-by-step. Have left frame loading from sql2005 and it's working great. Next I'm working on the list of items in the bottom right frame. (don't event have the soure identified in the top right as yet). Problem is, he wrote it in C and I don't have a clue. Converted it, but I'm having problems. Anybody able to provide simplistic help for a newbie? right now, it's stopping with an error of:

System.FormatEx ception: Input string was not in a correct format.
for the line:
Dim feedXML As XmlDocument = CType(Cache("ch annel" + channelID), XmlDocument)




Expand|Select|Wrap|Line Numbers
  1. <%@ Import Namespace="System.Web.UI.WebControls" %>
  2. <%@ Import Namespace="System.Data" %>
  3. <%@ Import Namespace="System.Data.SqlClient" %>
  4. <%@ Import Namespace="System.Xml" %>
  5. <%@ Import Namespace="System.Xml.xsl" %>
  6. <%@Page Language="VB" debug="True"%>
  7. <script language="vb" runat="server">
  8. Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) 
  9.  Dim channelID As Integer 
  10.  if Request.QueryString("channelID")="" then channelID=0 else channelID=Int32.Parse(Request.QueryString("channelID")) 
  11.  Dim feedXML As XmlDocument = CType(Cache("channel" + channelID), XmlDocument) 
  12.  If feedXML Is Nothing Then 
  13.    Dim myConnection As SqlConnection = New SqlConnection("connect stuff;") 
  14.    Dim SQL_QUERY As String = "SELECT URL, UpdateInterval FROM its.dbo.xTblRssChannels WHERE channelID = @channelID" 
  15.    Dim myCommand As SqlCommand = New SqlCommand(SQL_QUERY, myConnection) 
  16.    Dim feedParam As SqlParameter = New SqlParameter("@channelID", SqlDbType.Int, 4) 
  17.    feedParam.Value = channelID 
  18.    myCommand.Parameters.Add(feedParam) 
  19.    myConnection.Open 
  20.    Dim reader As SqlDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection) 
  21.    reader.Read 
  22.    Dim feedURL As String = reader("URL").ToString 
  23.    Dim updateInterval As Integer = Int32.Parse(reader("UpdateInterval").ToString) 
  24.    myConnection.Close 
  25.    feedXML = New XmlDocument 
  26.    feedXML.Load(feedURL) 
  27.    Cache.Insert("channel" + channelID, feedXML, Nothing, DateTime.Now.AddMinutes(updateInterval), TimeSpan.Zero) 
  28.  End If 
  29.  xmlNewsItems.Document = feedXML 
  30.  Dim xsltArgList As Xsl.XsltArgumentList = New XsltArgumentList 
  31.  xsltArgList.AddParam("channelID", "", channelID) 
  32.  xmlNewsItems.TransformArgumentList = xsltArgList 
  33. End Sub
  34. </script>
  35. <script language="javascript">
  36.   // display a blank page in the bottom frame when the news items loads
  37.   parent.rbottom.location.href = "about:blank";
  38. </script>
  39. </head>
  40. <body>
  41. <form id="Form1" method="post" runat="server">
  42.  <asp:Xml id="xmlNewsItems" runat="server" TransformSource="rssItems.xslt"></asp:Xml>
  43. </body>
  44. </HTML>
Aug 18 '06 #1
0 1334

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1317
by: Philippe C. Martin | last post by:
Hi, Is there a program out there that would generate the C code to instantiate objects and call them: ex: miracle.exe -i mymodule.py -o module_internface.c ? I seem to recall a _yes_ to that but I got a memory overflow :-) Thanks,
0
1168
by: Twayne | last post by:
Twayne wrote: That's the verification I was looking for I think. There are times that doesn't seem to be so, but perhaps I'll looking at the wrong side of the tree in the wrong forest ... I think I let POST usages confuse me. .... D'oh! No, I hadn't thought of looking at the souce in my browser! Nothing like being half-armed and half-fast, huh? Guess I better switch
5
1137
by: Banibrata Dutta | last post by:
Hi, I've gone through the list of "language differences" between 2.3 / 2.4 & 2.5 of CPython. I've spend around 2 weeks now, learning v2.5 of CPython, and I consider myself still very very newbie. So, unable to take a call as to how-important or desirable the newer language features are -- so whether to write my app for v2.5 of Python, versus, as few others on this list have recommended, i.e. to stick to v2.3 ?? Are the preformance...
16
1869
by: Raxit | last post by:
Hi, i was reading/learning some hello world program in python. I think its very simillar to Java/C++/C#. What's different (except syntax) ? what can i do easily with python which is not easy in c++/java !? Tnx, Raxit
10
1256
by: Peter Michaux | last post by:
On May 14, 8:55 pm, Prisoner at War <prisoner_at_...@yahoo.comwrote: Get it from the library. I cannot imagine needing to own an HTML book. There are plenty of good references on the web. Understand that XHTML is not for the general web. HTML is a better option. I own Eric Meyer's "CSS: The Definitive Guide" and am glad that I do. It is the best definitive guide I've read on any web topic. "Bullet Proof Web Design" is the best book...
2
1239
by: r_ahimsa_m | last post by:
Could you recommend me some free JavaScript validator? I was using JSlint but it reports nonsense errors. Please help. Thanks. /RAM/
6
1897
by: raylopez99 | last post by:
Will ASP.NET 3.0 work under Visual Studio 2005? And what is a good newbie ASP.NET book? Subject: Will ASP.NET 3.0 work under Visual Studio 2005? And what is a good newbie ASP.NET book? My question is in the title. I have experience with C#, SQL, C++/CLI and have done exercises in a book on database design, so I'm not a total beginner, but a recommendation for an intermediate book on ASP.NET is appreciated.
3
2337
Lokean
by: Lokean | last post by:
Sorry for this newbie question, this is not my realm of expertese. I have searched google, tried several applications that claim they can do this, such as Mapforce, which I found confusing, to Oxygen, to HTML kit, et cetera. I am more confused than ever. here's my quandry. I was sent a file and told that we need to get the data into a more readable form. I've tried using apps to pull it in, but it's not displaying properly.
5
1395
by: Dave | last post by:
I am new to Visual Web Developer 2005 Expres. I am using absolute positioning and every time I add a button control to my web form its width extends all the way to the edge of the page. IOW I get a long skinny button that extends to the right side of the browser. This does not appear to happen with other controls. Any idea why it happens to the button? Here is how the button looks in source code:
5
2143
by: SharkD | last post by:
Hi! I'm a total newbie when it comes to ASP (or any type of server-side programming). I want to start a project that does the following: 1. query Wikipedia for information regarding articles using the
0
8472
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8464
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8324
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6805
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5471
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3954
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4015
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1318
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.