Plugin doesnt seem to be getting XML in BlogItem

Newsgator Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Plugin doesnt seem to be getting XML in BlogItem Expand / Collapse
Author
Message
Posted 11/7/2003 1:10:00 PM
Forum Member

Forum Member

Group: Forum Members
Last Login: 12/4/2003 11:30:00 AM
Posts: 6, Visits: 1

I might be missing something really obvious, but in BlogItem is seems I am getting a string that is not in any XML format.  For example, I get channelTitlelinkchanneldescriptionIndustry unites against drunk dogs... as one big ugly string.

Here is the code I am using to see this string

XPathNavigator xnav = rssFragment.CreateNavigator ();

MessageBox.Show(xnav.Value );

MessageBox.Show(xnav.XmlLang );

MessageBox.Show(xnav.ToString() );

Ideas???

 

Post #1109
Posted 11/7/2003 1:25:00 PM
NewsGator

NewsGator

Group: Administrators
Last Login: 9/2/2008 2:11:41 PM
Posts: 1,084, Visits: 35

You're seeing expected behavior for what you're doing...but what you WANT to be doing  is something like the following:

XPathNavigator nav = rssFragment.CreateNavigator();

XPathNodeIterator iterator =
nav.Select("/rss/channel/item/description");
while (iterator.MoveNext())
{
   description = iterator.Current.Value;
}

iterator = nav.Select("/rss/channel/item/title");
while (iterator.MoveNext())
{
   title = iterator.Current.Value;
}

That should get you started...

Post #1110
Posted 11/7/2003 1:35:00 PM
Forum Member

Forum Member

Group: Forum Members
Last Login: 12/4/2003 11:30:00 AM
Posts: 6, Visits: 1

Yep starting from the root did the trick.  Thanks.

 

NewsGator Rocks!  I simply love it. 

I assume most of the Outlook related code you have is COM, right?

Post #1111
Posted 11/7/2003 1:46:00 PM
Forum Member

Forum Member

Group: Forum Members
Last Login: 12/4/2003 11:30:00 AM
Posts: 6, Visits: 1

One more question and it is probably as obvious as the first...

Why do these simple return "channelTitle" and "channelLink"?

iterator = xnav.Select("/rss/channel/title");

while (iterator.MoveNext())

{

string link = iterator.Current.Value;

MessageBox.Show(link);

}

iterator = xnav.Select("/rss/channel/link");

while (iterator.MoveNext())

{

string link = iterator.Current.Value;

MessageBox.Show(link);

}

Post #1112
Posted 11/7/2003 1:47:00 PM
NewsGator

NewsGator

Group: Administrators
Last Login: 9/2/2008 2:11:41 PM
Posts: 1,084, Visits: 35

Cool, glad it's working better now.  And I'm glad you like NewsGator!

Post #1113
Posted 11/7/2003 1:49:00 PM
NewsGator

NewsGator

Group: Administrators
Last Login: 9/2/2008 2:11:41 PM
Posts: 1,084, Visits: 35

On the channel title and link, NewsGator doesn't actually store channel information for the items, so it doesn't have anything useful to put in those items.

They are, however, required by the RSS 2.0 spec. In this case, you should just ignore them.

If you have a scenario where you think you need this information, let me know so we can see if there's some way to handle it, or if there's a good use case to start providing this information.

Post #1114
Posted 11/7/2003 1:59:00 PM
Forum Member

Forum Member

Group: Forum Members
Last Login: 12/4/2003 11:30:00 AM
Posts: 6, Visits: 1
What I am looking for is the link to the article.  I am storing the date, title, my comments and link to the original post in a database so I can search for it.
Post #1115
Posted 11/7/2003 2:20:00 PM
NewsGator

NewsGator

Group: Administrators
Last Login: 9/2/2008 2:11:41 PM
Posts: 1,084, Visits: 35

Gotcha.  The only way to do this right now would be to parse the link out of the description - we will always put it in there, in the same format, so you should be able to parse it out.

In the next release, this information will be provided directly.

Post #1116
Posted 11/7/2003 2:46:00 PM
Forum Member

Forum Member

Group: Forum Members
Last Login: 12/4/2003 11:30:00 AM
Posts: 6, Visits: 1
Right.  Thanks for all your help.  I will parse it out and wait for the new version.
Post #1117
« Prev Topic | Next Topic »