Displaying an RSS feed using XMLDom and ASP
Write a Review
Add to My Favorite
Refer it to Friend
Report Broken Link
Other links at ASP > Tips and Tutorials > XML and ASP
Sorry, I got a bit off hand with this tutorial. Though I saw some really horrible examples today on how to show an RSS feed using XMLDom so I just couldn?t stand not writing something about it. Imagnine a script that selects all nodes (XPath query was something like ?//*?), not carring where in the document, then looping them thru looking at their names and guessing what they are and then adding them to four separate strings with some weird separator. After doing this, they split the strings into four arrauys and started looping out the content. Oh please, it was horrible. No real sense of XML at all I?m afraid . I know there are better resources then that on the net, but I still felt I had to contribute with just one more.
If you never heard of RSS earlier, you are ethier very ignorant to what happens on the web these days and/or you are stuck running Internet Explorer which lacks any built in support for it. It all comes down quite easy though. An RSS feed is an online news syndication in the XML format. The main idea is to have a standardized way to share news over the net. I for an instance offers my articles as an RSS feed so people easily will know when I?ve written something new. For those who want to dive deeper into RSS I would recommend ?What Is RSS? over at XML.com.
I thought that it might also be a good idea to show a short RSS feed with only one news item in it so you know what source we are working with
Category:
By now, most of our readers are familiar, at least in principle, with XML - the w3c's platform neutral data markup language. However not everyone knows how to use XML with ASP. In this article, I'll run you through using ASP and JScript to open and read XML files. in the next article, I'll show you how to create and modify XML with ASP.
The example I'm going to show you is in use on my office intranet, for the purposes of identifying who is logged in. since all the machines in the office have a static, unique IP, I've used Request.ServerVariables("remote_host") to identify the machine, and XML to map machine to user. It's a little courtesy app, and also allows me to restrict administrative functions to only five machines in the entire office.
Category:
XML stands for Extensible Markup Language. XML can be used in many ways and one of which is 'data storage'. This is the one we will be exploring in this article. XML along with XSL ( Extensible Stylesheet Language ) can by used to present data on the web pages. XML provides the data and XSL allows us to present it the way we want. Remember though that not all browsers support XML on the client side, only Micrsoft Internet Explorer 5.0 and above support XML. XML can also be used to perform RPC ( Remote Procedure Call ). Actually this capability of XML to allow communication between distant applications is so strong that Microsoft has developed SOAP ( Simple Object Access Protocol ) specification which uses XML to allow communication between remote applications. XML can be used for a lot more purposes which I haven't mentioned here. Also keep in mind that Microsoft's future .NET platform will make use of XML even more than any tool does today. ASP+, ADO+ and others will use XML to define and present data. So if you are comfortable with XML today, it will help you in the near future when you will be getting yourself ready to develop applications in the revolutionary platform called Microsoft .NET.
Category:
This is the second article in my series about XML, XMLDom and ASP. For those who missed the first it?s avaible here
In my first article I showed how to parse an XML document using XMLDom and displaying the data. In this second tutorial I?ll show two different ways to retrieve an XML document from a remote server using ASP and ServerXMLHTTP.
XML is a great way to share information. However, if you want to be able to share it people will need to retrieve the data from you somehow (or you from them). For this purpose we have an object called XMLHTTP or, if used on a server, ServerXMLHTTP. Since both XMLDom and XMLHTTP are part of MSXML2 they can cooperate very nice. XMLDom can by auto use XMLHTTP to retrieve information and if you use XMLHTTP it can by auto return a XMLDom object with the retrieved XML data.
The easiest way to retrieve XML from an external site is to let the XMLDom handle it all. This requries the least amount of code and I would guess that it?s also a tiny bit more effective resource wise. Here is how to do it:
Category:
Pass-Guaranteed is your source for the Sun 310-081 exam. With our 310-081 Exam Resources, you can be rest assured that you will be fully prepared to take on your 310-081 Exam. Our Exams are written and formatted by Top senior IT Professionals working in today's prospering companies and data centers. All of our practice exams including the 310-081 exam will prepare you for success. 310-081 is a challenging exam, with our 310-081 study guide, you can feel safe with our question and answers that will help you in obtaining your successful completion of your 310-081 exam.
Category: