Geeks With Blogs

Joe Mayo February 2010 Entries
Extracting StatusID from LINQ to Twitter Search Results
The Twitter Search API returns an XML Atom formatted feed. So, in LINQ to Twitter, I've created an Atom object, which I return when someone performs a search. The problem with the results is that the ID of the Status is mangled with other information. To solve this problem, you need to extract the status ID from the number following the last colon of the ID from the search Entry. Here's some code to show how it's done: private static void SearchAndUseStatusTwitterDe... twitterCtx) { ......

Posted On Monday, February 1, 2010 9:46 PM

Translating Objects into XML Elements
A lot of examples on LINQ to XML show how to translate from XML into objects. Especially with REST data sources, it seems like a lot of LINQ to XML is used to read XML. However, there is also a need to translate from objects to XML, which isn't always as intuitive. The following example shows a couple different ways to translate from objects to XML. It starts with a string for the XML document. There is also a List of Customer objects. This example translates the objects into XElement's and then ......

Posted On Monday, February 1, 2010 8:22 PM

Copyright © Joe Mayo | Powered by: