|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: 2 days ago @ 1:12 PM
Points: 414,
Visits: 2,250
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, November 03, 2009 6:52 AM
Points: 2,
Visits: 22
|
|
I got a challenge. The RSS 2.0 Google Base feed: http://base.google.com/support/bin/answer.py?answer=58085&hl=en
It seemed like it would be easy using the following:
WITH XMLNAMESPACES ( 'urn:http://base.google.com/ns/1.0' as "g" ) however, the result repeats the namespace for each of the items.
item xmlns:g="urn:http://base.google.com/ns/1.0"
It appears to be well-formed, but I am unsure if Google will accept the feed with the extra namespace for each item. Do you know of another way to do this without the namespace getting repeated?
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Monday, November 02, 2009 9:26 AM
Points: 3,280,
Visits: 962
|
|
Good article. A new area to explore.
:)
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: 2 days ago @ 1:12 PM
Points: 414,
Visits: 2,250
|
|
I dont think a feed parser will complain for the namespace declaration on the item elements.
I had been writing another article on ATOM feed and realized that feed validators do not complain about the extra namespace declarations on the child elements.
Jacob Sebastian, SQL Server MVP http://beyondrelational.com/blogs/jacob/
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, November 03, 2009 6:52 AM
Points: 2,
Visits: 22
|
|
| Thanks Jacob. I will try to upload a feed and see if it they accept it.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, September 16, 2009 8:03 AM
Points: 132,
Visits: 156
|
|
Fantastic article! This was a good read.
I may use this technique for my one of my websites. I use SQL2k5 and was going to integrate RSS feeds. This technique just gave me the info I was looking for.
-M
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Thursday, November 05, 2009 5:05 AM
Points: 84,
Visits: 4,340
|
|
I've also enjoyed the article.
It's very clean to do that in this way. There's no need to do it in .NET  I also suppose that it performs much better...
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, October 30, 2009 12:05 PM
Points: 199,
Visits: 267
|
|
I like the article, it's very cool stuff. I'm just starting to look at RSS feeds, and this seems a very simple way to do it, without writing any ASP.net, though it seems if there is a login on your site, you might have too anyway.
My question is:How do I get my web page to see this view?. I run the SELECT statement at the end of your article, and a single item is generated, how do I turn that into a web page people see? I'm missing the final step about how to make this XML public, I guess.
Dan
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: 2 days ago @ 1:12 PM
Points: 414,
Visits: 2,250
|
|
You need to create a page that executes the TSQL code and returns the resultant XML to the HTTP response stream. The caller (usually an rss reader or a browser that understands how to display a feed) will identify the content type and will display the feed accordingly.
Jacob Sebastian, SQL Server MVP http://beyondrelational.com/blogs/jacob/
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: 2 days ago @ 1:12 PM
Points: 414,
Visits: 2,250
|
|
One option is to write a .NET application that executes the query/stored procedure and writes the output to a file: http://www.sqlservercentral.com/articles/XML/62054/
Or use a command line utility like sqlcmd.exe etc that can generate a file with the output of a query.
Jacob Sebastian, SQL Server MVP http://beyondrelational.com/blogs/jacob/
|
|
|
|