Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

get data from a rss file

Posted on 2005-03-31
7
Medium Priority
?
246 Views
Last Modified: 2010-04-05
I need to read (parse) a rss (www.construiesc.ro/rss_curs.php) and to get the infos from it. How to do that?
I need to get each title,description, subject and title.

Intend to store somewere as:

title1:           MyFirstTitle
description1: MyFirstDescription
subject1:      MyFirstSubject
date1:          MyFirstDate

......

Codes please!
0
Comment
Question by:ginsonic
  • 3
  • 3
7 Comments
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 13672098
It seems like a regular XML file, so you can use TXMLDocument component
0
 
LVL 9

Author Comment

by:ginsonic
ID: 13672141
I use D6Pro and look I don't have it.
0
 
LVL 12

Assisted Solution

by:Ivanov_G
Ivanov_G earned 800 total points
ID: 13672197
save the file from the URL to C:\RSS.xml, place a TXMLDocument component on your form and check this:

procedure TForm1.Button1Click(Sender: TObject);
var
  DOC       : IDOMDocument;
  RootNodes : IDOMNodeList;
  ChildNode : IDOMNode;
begin
  with XMLDocument1 do
    begin
      LoadFromFile('C:\RSS.xml');
      Active := True;
    end;
  DOC := XMLDocument1.DOMDocument;
  RootNodes := DOC.getElementsByTagName('channel');
  RootNodes := RootNodes[0].childNodes;
  ChildNode := RootNodes[0].firstChild;
  ShowMessage(ChildNode.nodeValue);
end;
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 12

Expert Comment

by:Ivanov_G
ID: 13672258
Go to View / Components list and check there. If you don't have it ... hmmm
Then you can try with alternative XML parser, for example SAX (http://saxforpascal.sourceforge.net/)
0
 
LVL 9

Author Comment

by:ginsonic
ID: 13672279
Where can I find the TXMLDocument ??
0
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 1200 total points
ID: 13672608
>>Where can I find the TXMLDocument ??
I don't think it's part of Pro version AFAIK

Have you seen SimpleRSS?
http://sourceforge.net/projects/simplerss/

also these articles will help you
http://delphi.about.com/od/internetintranet/l/aa072903a.htm
http://bdn.borland.com/article/0,1410,31981,00.html
0
 
LVL 9

Author Comment

by:ginsonic
ID: 13672953
Thanks for support!
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question