I've put together the following vb.net console to demonstrate the
issue.
I went ahead and removed my credentials before posting it, but it's a
public blog, so it should be accessible with any login.
Imports Google.GData.Client
Module Module1
Sub Main()
Dim thisService As Service = New Service("blogger",
"RobFine.com")
thisService.Credentials = New GDataCredentials("MYUSERNAME",
"MYPASSWORD")
Dim thisFactory As GDataGAuthRequestFactory =
CType(thisService.RequestFactory, GDataGAuthRequestFactory)
thisFactory.AccountType = "GOOGLE"
Dim query As New Google.GData.Client.FeedQuery()
query.Uri = New Uri("http://www.blogger.com/feeds/
3834455919215962619/posts/default/5777934424638844396")
Dim feed As Google.GData.Client.AtomFeed =
thisService.Query(query)
For Each thisEntry As AtomEntry In feed.Entries
System.Console.WriteLine(thisEntry.Title.Text)
System.Console.WriteLine()
System.Console.WriteLine(thisEntry.Content.Content.Replace("<br />",
vbCrLf))
System.Console.WriteLine()
Next
System.Console.ReadLine()
End Sub
End Module
As a further example, here is that same entry shown on blogspot:
http://atlantawebsites.blogspot.com/2011/01/pay-no-attention-to-man-behind-curtain.html
And that same entry shown after being pulled through the .NET GData
API:
http://www.robfine.com/aspnet/Paynoattentiontothemanbehindthecurtain
Thanks!
Rob
On Jan 20, 2:10 pm, Brett Morgan <brettmor...@google.com> wrote:
> Hey Rob,
>
> I suspect you have uncovered a bug in our .Net GData API.
>
> Can you boil this down to a simple c# or vb console app and log a bug
> against the issue tracker?http://code.google.com/p/google-gdata/issues/list
>
> Please ping me with the issue number so that I can track it from this end.
>
> brett
>
>
>
>
>
> On Fri, Jan 21, 2011 at 2:57 AM, Rob <robf...@gmail.com> wrote:
> > Hey all,
>
> > I am using the .NET API to pull the content from a blog I author about
> > tips and tricks I run across while developing websites and
> > applications, but I've lately run into an issue where the content I
> > pull is not exactly the same as what's being posted on blogspot.
>
> > Due to the nature of my blog, I'm constantly needing to display html
> > tags such as <body id="example"> but to have this display properly on
> > blogspot, I write it out as <body id="example">
>
> > However, when I pull my feed from the .NET API and extract the content
> > via thisFeedEntry.Content.Content, all of the blog content comes
> > already rendered with brackets instead of the ampersand encodings.
>
> > I tried doing a replace on all brackets to transform them back to >
> > and < but of course that changed all of the content's source code
> > over including line breaks, div panels and links. I don't want that.
>
> > Here's a good example of what I'm experiencing.
> > My blogspot shows the text <body runat="server" id="masterbody"> fine
> > here:
>
> >http://atlantawebsites.blogspot.com/2011/01/aspnet-body-onload-error-...
> > But when I pull it over through the API, the text with bracket
> > disappears at the browser is attempting to render it:
> >http://robfine.com/aspnet/ResolvingBodyOnLoadErrorBC30456whenrunatServer
>
> > Is there a way to pull the code exactly as is in blogspot with the
> > > and < text still intact?
>
> > Any help would be greatly appreciated.
> > Thanks!
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Blogger Developer Group" group.
> > To post to this group, send email to bloggerdev@googlegroups.com.
> > To unsubscribe from this group, send email to
> > bloggerdev+unsubscribe@googlegroups.com<bloggerdev%2Bunsubscribe@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/bloggerdev?hl=en.
>
> --
>
> Brett Morgan
>
> Developer Programs Engineer, Blogger- Hide quoted text -
>
> - Show quoted text -
--
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To post to this group, send email to bloggerdev@googlegroups.com.
To unsubscribe from this group, send email to bloggerdev+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bloggerdev?hl=en.
No comments:
Post a Comment